Constructor
new Instance(instanceopt, authopt, apiBaseopt)
Create a Instance.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
instance |
string
|
<optional> |
the instance to use for user-scoped queries |
|
auth |
Requestable.auth
|
<optional> |
information required to authenticate to ApiWay |
|
apiBase |
string
|
<optional> |
https://api.apiway.io |
the base ApiWay API URL |
Methods
addInstance(options, cbopt) → {Promise}
Add a new Instance
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
object
|
- |
|
cb |
Requestable.callback
|
<optional> |
will receive the API response |
Returns:
- Type:
-
Promise
- the promise for the http request
getInstance(projectIdopt, cbopt) → {Promise}
Get project information
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
projectId |
string
|
<optional> |
|
cb |
Requestable.callback
|
<optional> |
will receive the list of repositories |
Returns:
- Type:
-
Promise
- the promise for the http request
getInstancesByProject(projectIdopt, options, cbopt) → {Promise}
Get project's instance list
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
projectId |
string
|
<optional> |
|
options |
object
|
- |
|
cb |
Requestable.callback
|
<optional> |
will receive the list of repositories |
Returns:
- Type:
-
Promise
- the promise for the http request
getInstancesByUser(userIdopt, options, cbopt) → {Promise}
Get user's project list
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
userId |
string
|
<optional> |
|
options |
object
|
- |
|
cb |
Requestable.callback
|
<optional> |
will receive the list of repositories |
Returns:
- Type:
-
Promise
- the promise for the http request
updateInstance(options, cbopt) → {Promise}
Update user's profile (Will create a new user if not exist)
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
object
|
- |
|
cb |
Requestable.callback
|
<optional> |
will receive the API response |
Returns:
- Type:
-
Promise
- the promise for the http request