Skip to content

Instantly share code, notes, and snippets.

@lightsofapollo
Created July 29, 2014 18:57
Show Gist options
  • Save lightsofapollo/100f735e17a7423428ef to your computer and use it in GitHub Desktop.
Save lightsofapollo/100f735e17a7423428ef to your computer and use it in GitHub Desktop.
/**
* Create a client class from a JSON reference.
*
* Returns a Client class which can be initialized with following options:
* options:
* {
* clientId: '...', // ClientId
* accessToken: '...', // AccessToken for clientId
* // Optional authorization details for delegating auth.
* authorization: {
* delegating: true || false, // Is delegating authentication?
* scopes: ['scopes', ...] // Scopes to authorize with
* }
* baseUrl: 'http://.../v1' // baseUrl for API requests
* exchangePrefix: 'queue/v1/' // exchangePrefix prefix
* }
*
* `baseUrl` and `exchangePrefix` defaults to values from reference.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment