Class: AppSettings

appLib/SDKDrivers/xFrameDriver/appSettings.AppSettings

Settings repository.

The Settings class allows you to manage the settings of the app.

Implements

IBundle

Hierarchy

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new AppSettings(agent)

Creates an instance of Repository.

Parameters

Name Type
agent PeerAgent

Inherited from

Repository.constructor

Methods

crudReq

crudReq(data): void

Sends a CRUD request to the xFrame.

Parameters

Name Type
data any

Returns

void

Inherited from

Repository.crudReq


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


get

get(setting?): Promise<iAppSettings>

Retrieves the settings of your app.

Example

Copy
Copied
const generalSettings = await dl.settings.get()
const { theme, currentUser } = generalSettings

Example

Copy
Copied
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