Last updated

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 } = generalSettings

Example

const setting = await dl.settings.get('userSettingName')

Parameters

NameTypeDescription
setting?stringThe 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

NameTypeDescription
dataanyThe data to send.
optionsObject
options.timeout?numberan 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

NameType
dataany

Returns

void

Inherited from

Repository.crudReq

Constructors

constructor

new AppSettings(agent)

Creates an instance of Repository.

Parameters

NameType
agentPeerAgent

Inherited from

Repository.constructor