Class: AppSettings
Settings repository.
The Settings class allows you to manage the settings of the app.
Implements
IBundle
Hierarchy
Repository↳
AppSettings
Implements
Table of contents
Methods
Constructors
Methods
get
▸ get(setting?): Promise<iAppSettings>
Retrieves the settings of your app.
Example
const generalSettings = await dl.settings.get()
const { theme, currentUser } = generalSettingsExample
const setting = await dl.settings.get('userSettingName')Parameters
| Name | Type | Description |
|---|---|---|
setting? | string | The name of the user setting to retrieve. |
Returns
Promise<iAppSettings>
- A promise that resolves to the settings of the app.
Implementation of
IBundle.get
crudReqSync
▸ crudReqSync(data, options?): Promise<any>
Sends a CRUD request to the xFrame.
Parameters
| Name | Type | Description |
|---|---|---|
data | any | The data to send. |
options | Object | |
options.timeout? | number | an option to set the timeout for the request. |
Returns
Promise<any>
Inherited from
Repository.crudReqSync
crudReq
▸ crudReq(data): void
Sends a CRUD request to the xFrame.
Parameters
| Name | Type |
|---|---|
data | any |
Returns
void
Inherited from
Repository.crudReq
Constructors
constructor
• new AppSettings(agent)
Creates an instance of Repository.
Parameters
| Name | Type |
|---|---|
agent | PeerAgent |
Inherited from
Repository.constructor