Home Reference Source
public class | source

BaseContainer

Direct Subclass:

CloudCodeContainer, Container

BaseContainer provides the basic configuration for connecting to a Skygear server.

For development under different environments, developer may refer to these classes:

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

ACL: ACL

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 static get VERSION: String source

The version of Skygear.

Public Constructors

public constructor() source

Public Members

public get ACL: ACL source

public get Asset: Asset source

public get AuthContainer: AuthContainer source

public get Database: Database source

public get DatabaseContainer: DatabaseContainer source

public get Error: SkygearError source

public get ErrorCodes: ErrorCodes source

public get Follower: Relation source

public get Following: Relation source

public get Friend: Relation source

public get Geolocation: Geolocation source

public get PubsubContainer: PubsubContainer source

public get PushContainer: PushContainer source

public get Query: Query source

public get Record: Record source

public get Reference: Reference source

public get RelationContainer: RelationContainer source

public get Role: Role source

public get Sequence: Sequence source

public get UserRecord: Record source

public get VERSION: String source

The version of Skygear. Convenient getter.

public apiKey: String source

API key of the skygear container

public get endPoint: String source

Endpoint of the skygear container

public set endPoint: String source

Endpoint of the skygear container

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:

NameTypeAttributeDescription
options Object

configuration options of the skygear container

options.apiKey String

api key

options.endPoint String

end point

Return:

Promise<BaseContainer>

promise with the skygear container

public configApiKey(apiKey: String) source

Sets a new API key to the container.

Params:

NameTypeAttributeDescription
apiKey String

api key of the skygear container

public configEndPoint(endPoint: String) source

Sets a new end point to the container.

Params:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
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