GetSocial

GetSocial

# new GetSocial()

Source:

Methods

# (static) addOnInitializedListener(onInit)

Notifies callers when SDK finished initialization.
Parameters:
Name Type Description
onInit function Function to be invoked.
Source:

# (static) getCurrentUser() → {CurrentUser}

Current user.
Source:
Returns:
current user or null if SDK is not initialized.
Type
CurrentUser

# (static) getLanguage() → {string}

Returns current language of GetSocial plugin.
Source:
Returns:
currently used language.
Type
string

# (static) getSdkVersion() → {string}

Returns version of GetSocial SDK.
Source:
Returns:
: version as string.
Type
string

# (static) init(config)

Initializes the GetSocial.
Parameters:
Name Type Description
config Object
Properties
Name Type Attributes Default Description
appId string GetSocial App ID
appName string App Name
appVersion string <optional>
App Version
language string <optional>
"en" SDK language
Source:

# (static) initWithAppId(appId,)

Initializes the SDK. Use whenInitialized event with GetSocialEventEmitter to get notified when initialization finished.
Parameters:
Name Type Description
appId, string as it is on GetSocial Dashboard.
Source:

# (static) isInitialized() → {boolean}

Returns if SDK is initialized or not.
Source:
Returns:
true, if initialized, otherwise false.
Type
boolean

# (static) setLanguage(language) → {Promise.<string>}

Sets the language of GetSocial plugin. If provided value is incorrect, sets the default language.
Parameters:
Name Type Description
language string
Source:
Returns:
language code or error
Type
Promise.<string>