OrderCloud Angular 1.xx SDK
This Angular 1.xx SDK is a wrapper for the OrderCloud Javascript SDK which is auto-generated from our Swagger Spec
Getting Started
If you're new to ordercloud check out our documentation.
Additional SDK specific documentation can be found here
Installation
- Type the following into a terminal window:
bower install ordercloud-angular-sdk --save
- include the ordercloud-angular-sdk module as a dependency:
angular
Configuration
The SDK exposes OrderCloudSDK.Config
to configure settings required to run. It receives the following parameters:
- cookiePrefix // this determines what to prefix cookies as when saving them.
- apiUrl // ordercloud.io base api url followed by the api version number (currently v1)
- authurl // ordercloud.io base auth url
We recommend setting these in a run block like so:
angular
Additional SDK Methods
In addition to the standard methods provided via the Javascript SDK, the following methods are added to allow you to interact with tokens (stored in cookies) for a user as well as an impersonated user.
OrderCloudSDK;OrderCloudSDK;OrderCloudSDK; OrderCloudSDK;OrderCloudSDK; OrderCloudSDK;OrderCloudSDK;OrderCloudSDK;
Example
The following example will show you how to:
- log in as a user
- set the user's token in cookies
- make an API call to retrieve user's details
var username = 'user123';var password = 'foobar'var clientid = '7FC87166-D42A-4F2D-9587-159D98156314' //you can find your app's client id in the [dashboard](https://developer.ordercloud.io/dashboard/applications)var scope = 'FullAccess'; //this is an array of roles (permissions) being requested. More info on roles [here](https://developer.ordercloud.io/documentation/platform-guides/authentication/security-profiles) OrderCloudSDKAuth
Additional Information
Be sure to check out our API documentation.
Additional SDK specific documentation can be found here