Backend
Represents a mobile backend in Oracle Mobile Hub
and provides access to all capabilities of the backend.
Callers should use mcs's mobileBackend property...
- Source:
Members
(readonly) analytics :Analytics
Returns the Analytics object that enables capture of mobile analytics events.
Type:
- Source:
(readonly) appConfig :object
Returns an instance of the application configuration object.
Callers can download the configuration from the service by invoking loadAppConfig().
Type:
- object
- Source:
(readonly) authorization :Authorization
Returns the Authorization object used to authorize a mobile user
against Oracle Mobile Hub
Please use mcs#mobileBackend#setAuthenticationType to initialize this property.
Type:
- Source:
(readonly) customCode :CustomCode
Returns the CustomCode object that enables calls to custom APIs.
Type:
- Source:
(readonly) diagnostics :Diagnostics
Get diagnostic object.
Returns the Diagnostics object that enables end-end debugging across application and cloud.
Type:
- Source:
(readonly) name :string
The name of the MobileBackend as read from the configuration.
Type:
- string
- Source:
(readonly) storage :Storage
Returns the Storage object that provides cloud-based object storage capabilities.
Type:
- Source:
(readonly) synchronization :Synchronization
Returns the Synchronization object that provides caching and synchronization capabilities.
Type:
- Source:
Methods
getAuthenticationType() → {string}
Use this method to retrieve current authentication type.
- Source:
Returns:
Authentication type
- Type
- string
getCustomCodeUrl(path) → {string}
Constructs a full URL by prepending the prefix for custom API REST endpoints
to the given endpoint path.
Parameters:
Name | Type | Description |
---|---|---|
path |
string | The relative path of the endpoint following the platform prefix, i.e. {BaseUrl}/mobile/custom. |
- Source:
Returns:
The full URL.
- Type
- string
getHttpHeaders(headersopt) → {Headers}
Populates auth and diagnostics HTTP headers for making REST calls to a mobile backend.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
headers |
Headers |
<optional> |
An optional object with which to populate with the headers. |
- Source:
Returns:
The headers parameter that is passed in.
If not provided, a new object with the populated headers
as properties of that object is created.
- Type
- Headers
getPlatformUrl(path) → {string}
Constructs a full URL by pre-pending the prefix for platform API REST endpoints
to the given endpoint path.
Parameters:
Name | Type | Description |
---|---|---|
path |
string | The relative path of the endpoint following the platform prefix, i.e. /mobile/platform. |
- Source:
Returns:
The full URL.
- Type
- string
loadAppConfig() → {Promise.<NetworkResponse>}
Downloads the configuration from the service.
The AppConfig property will contain the downloaded configuration.
- Source:
Returns:
- Type
- Promise.<NetworkResponse>