Methods
(static) configure(config) → {Object}
Configure API part with aws configurations
Parameters:
Name | Type | Description |
---|---|---|
config |
Object | Configuration of the API |
- Source:
Returns:
- The current configuration
- Type
- Object
(static) createInstance()
Create an instance of API for the library
- Source:
Returns:
- A promise of true if Success
(async, static) del(apiName, path, initopt) → {Promise}
Make a DEL request
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
apiName |
String | The api name of the request | |
path |
String | The path of the request | |
init |
json |
<optional> |
Request extra params |
- Source:
Returns:
- A promise that resolves to an object with response status and JSON data, if successful.
- Type
- Promise
(async, static) endpoint(apiName) → {String}
Getting endpoint for API
Parameters:
Name | Type | Description |
---|---|---|
apiName |
String | The name of the api |
- Source:
Returns:
- The endpoint of the api
- Type
- String
(async, static) get(apiName, path, initopt) → {Promise}
Make a GET request
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
apiName |
String | The api name of the request | |
path |
JSON | The path of the request' | |
init |
json |
<optional> |
Request extra params |
- Source:
Returns:
- A promise that resolves to an object with response status and JSON data, if successful.
- Type
- Promise
(async, static) head(apiName, path, initopt) → {Promise}
Make a HEAD request
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
apiName |
String | The api name of the request | |
path |
String | The path of the request | |
init |
json |
<optional> |
Request extra params |
- Source:
Returns:
- A promise that resolves to an object with response status and JSON data, if successful.
- Type
- Promise
(async, static) post(apiName, path, initopt) → {Promise}
Make a POST request
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
apiName |
String | The api name of the request | |
path |
String | The path of the request | |
init |
json |
<optional> |
Request extra params |
- Source:
Returns:
- A promise that resolves to an object with response status and JSON data, if successful.
- Type
- Promise
(async, static) put(apiName, path, initopt) → {Promise}
Make a PUT request
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
apiName |
String | The api name of the request | |
path |
String | The path of the request | |
init |
json |
<optional> |
Request extra params |
- Source:
Returns:
- A promise that resolves to an object with response status and JSON data, if successful.
- Type
- Promise