import {BaseContainer} from 'skygear-build/packages/skygear-core/lib/container.js'
BaseContainer
Direct Subclass:
BaseContainer provides the basic configuration for connecting to a Skygear server.
For development under different environments, developer may refer to these classes:
- Web developement: Container
- React Native: ReactNativeContainer
- Cloud development: CloudCodeContainer
It also proxies other Skygear classes, like BaseContainer#Query. Thus developer who install Skygear with <script> tag in browser can have access to those classes.
Static Member Summary
Static Public Members | ||
public static get |
VERSION: String The version of Skygear. |
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
VERSION: String The version of Skygear. |
|
public |
apiKey: String API key of the skygear container |
|
public get |
endPoint: String Endpoint of the skygear container |
|
public set |
endPoint: String Endpoint of the skygear container |
Method Summary
Public Methods | ||
public |
async clearCache(): Promise Clears all cache in skygear container store. |
|
public |
async config(options: Object): Promise<BaseContainer> Sets a new end point and new API key to the container. |
|
public |
configApiKey(apiKey: String) Sets a new API key to the container. |
|
public |
configEndPoint(endPoint: String) Sets a new end point to the container. |
|
public |
async lambda(name: String, data: Object): Promise<Object> Calls a registered lambda function without arguments. |
Static Public Members
Public Constructors
public constructor() source
Public Members
public get AuthContainer: AuthContainer source
public get DatabaseContainer: DatabaseContainer source
public get Error: SkygearError source
public get ErrorCodes: ErrorCodes source
public get Geolocation: Geolocation source
public get PubsubContainer: PubsubContainer source
public get PushContainer: PushContainer source
public get RelationContainer: RelationContainer source
Public Methods
public async clearCache(): Promise source
Clears all cache in skygear container store.
Return:
Promise | resolve when cache is cleared successfully |
public async config(options: Object): Promise<BaseContainer> source
Sets a new end point and new API key to the container.
Params:
Name | Type | Attribute | Description |
options | Object | configuration options of the skygear container |
|
options.apiKey | String | api key |
|
options.endPoint | String | end point |
public configApiKey(apiKey: String) source
Sets a new API key to the container.
Params:
Name | Type | Attribute | Description |
apiKey | String | api key of the skygear container |
public configEndPoint(endPoint: String) source
Sets a new end point to the container.
Params:
Name | Type | Attribute | Description |
endPoint | String | end point of the skygear container |
public async lambda(name: String, data: Object): Promise<Object> source
Calls a registered lambda function without arguments.
Params:
Name | Type | Attribute | Description |
name | String | name of the lambda function being called |
|
data | Object | data passed to the lambda function |
Return:
Promise<Object> | promise with result of the lambda function |