Members
(static) axios
- Source:
Reference to the underlying axios package (https://www.npmjs.com/package/axios)
Useful for creating new instances of axios if you want to create http requests to
external APIs and not send tokens etc..
Example
const newRequest = await sdk.api.axios.get('https://otherapi.com/content/61eca4746971e75c1fc670cf');
Methods
(static) generateEndpointURL(endpoint, params, options)
- Source:
Generate an Endpoint URL, complete with authentication.
this function is helpful for generating authenticated links for the user to open in another window
Example
const result = sdk.api.generateEndpointURL('/image/61eca4746971e75c1fc670cf', {
w:100,
h:50,
}, {file:true})
// Would return something similar to:
// https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&h=50&access_token=XXXX...
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
endpoint |
String | The endpoint to generate a url for | |||||||||
params |
Object | Extra parameters for the url | |||||||||
options |
Object | Additional request configuration
Properties
|