ParseConfig

Parse~ ParseConfig

Parse.Config is a local representation of configuration data that can be set from the Parse dashboard.

Constructor

new ParseConfig()

Methods

(static) current() → {Parse.Config}

Retrieves the most recently-fetched configuration object, either from memory or from local storage if necessary.

Returns:
Type:
Parse.Config

The most recently-fetched Parse.Config if it exists, else an empty Parse.Config.

(static) get(options) → {Promise}

Gets a new configuration object from the server.

Parameters:
Name Type Description
options object

Valid options are:

  • useMasterKey: In Cloud Code and Node only, causes the Master Key to be used for this request.
Returns:
Type:
Promise

A promise that is resolved with a newly-created configuration object when the get completes.

(static) save(attrs, masterKeyOnlyFlags) → {Promise}

Save value keys to the server.

Parameters:
Name Type Description
attrs object

The config parameters and values.

masterKeyOnlyFlags object

The flags that define whether config parameters listed in attrs should be retrievable only by using the master key. For example: param1: true makes param1 only retrievable by using the master key. If a parameter is not provided or set to false, it can be retrieved without using the master key.

Returns:
Type:
Promise

A promise that is resolved with a newly-created configuration object or with the current with the update.

escape(attr) → {string}

Gets the HTML-escaped value of an attribute.

Parameters:
Name Type Description
attr string

The name of an attribute.

Returns:
Type:
string

get(attr) → {*}

Gets the value of an attribute.

Parameters:
Name Type Description
attr string

The name of an attribute.

Returns:
Type:
*