Class: MobileEndpoint

Class: MobileEndpoint

MobileEndpoint

Class that represents an endpoint in a custom code API. Callers should use Synchronization.openEndpoint() to create a new MobileEndpoint.
Source:

Methods

fetchObject(id, fetchFromService) → {Promise.<(MobileObject|ResourceProcessorResponse)>}

Fetch MobileObject. Fetches an object from the API's endpoint.
Parameters:
Name Type Description
id String The ID of the object.
fetchFromService Boolean If true will download from the service; if false will return any pinned object and will trigger a background refresh.
Source:
Returns:
Type
Promise.<(MobileObject|ResourceProcessorResponse)>

fetchObjects() → {FetchCollectionBuilder}

Fetch mobile objects. Method to fetch a collection of objects from the endpoint. If the collection exists in the cache, the cached copy is returned; otherwise it is downloaded from the service..
Source:
Returns:
Type
FetchCollectionBuilder

purge()

Purge cache. Deletes all cached resources.
Source:

purge() → {MobileObject}

Create MobileObject. Creates a new MobileObject. The object is not uploaded to the service until save() is invoked.
Source:
Returns:
A new MobileObject.
Type
MobileObject