Class nokia.Settings
Class Summary
An observable static class that keeps API settings. Class is used as a storage for data that is used
API-wide such as defaultLanguage, appId, authenticationToken. Properties
of the class are suppoused to be set via set method and shouldn't be set directly.
Example:
nokia.Settings.set("defaultLanguage", "en-GB")
nokia.Settings.set("appId", "YOUR APPID")
nokia.Settings.set("authenticationToken", "YOUR TOKEN")
Method Summary
static
addObserver
(name, callback, [context])
This method registers an observer for the property named by the caller.
static
set
(name, value)
This method sets property values, using the property names and values supplied by the caller.
Field Summary
static
String
appId
An id which authenticates the requested application or Web page.
static
String
authenticationToken
A token which authenticates the requested application or Web page.
static
String
defaultLanguage
The default language used by all service managers.
static
removeObserver
This method unregisters a previously registered observer from the property named by the caller.
Method Detail
static
addObserver
(name, callback, [context])
This method registers an observer for the property named by the caller.
Parameters:
| {String} | name | The name of the property to observe |
| {Function} | callback |
The function to be called if the observed property is modified; the
function must be able to receive the following arguments:
|
| {Object} | [context]: |
The context in which the given function should be called (default
null)
|
Field Detail
static
String
appId
An id which authenticates the requested application or Web page. The third-party offering comes
with an inbuilt id, limited to a certain amount of requests per day. Property
is not supposed to be set directly
set method should be used instead.
static
String
authenticationToken
A token which authenticates the requested application or Web page. The third-party offering comes
with an in-built token, limited to a certain amount of requests per day. Property
is not supposed to be set directly
set method should be used instead.
