Constructor
new UROAuth(options)
Parameters:
Name | Type | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | API options
Properties
|
- Source:
Extends
- OAuth
Members
accessToken :Token
Access token
Type:
- Source:
(readonly) API_URL :String
query URL
Type:
- String
- Source:
(readonly) AUTHORIZE_URL :String
Authorization URL
Type:
- String
- Source:
proxyClient
Creates a proxy client to call API with syntaxic sugar
- Source:
requestToken :Token
Request token
Type:
- Source:
Methods
getAccessToken(requestTokenopt) → {Promise.<Token>}
Get access token from request token
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
requestToken |
Token |
<optional> |
Request token |
- Source:
Returns:
- Type
- Promise.<Token>
getAuthorizeUrl(callbackUrlopt) → {string}
Get the authorization URL for the player
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callbackUrl |
<optional> |
The callback url for the query |
- Source:
Returns:
The authorize URL
- Type
- string
getRequestToken() → {Promise.<Token>}
Get request token
- Source:
Returns:
- Type
- Promise.<Token>
multipleQueries(…queries) → {Promise.<Object.<String, QueryResult>>}
Do one or more queries on the UR API
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
queries |
Object |
<repeatable> |
All queries to do
Properties
|
- Source:
Returns:
The queries results, indexed by the call name
- Type
- Promise.<Object.<String, QueryResult>>
(async) query(call, paramsopt, filtersopt) → {Promise.<QueryResult>}
Do one query
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
call |
String | Call name | |||||||||||||||||
params |
Object.<String, *> |
<optional> |
{} | Call params | |||||||||||||||
filters |
APIFilter |
<optional> |
{} | All filters you want on your query result
Properties
|
- Source:
Returns:
The query result
- Type
- Promise.<QueryResult>