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) → {Promise.<(AuthResponse|null)>}

Initializes the SDK.
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:
Returns:
Promise with the authenticated user and referral information (if any)
Type
Promise.<(AuthResponse|null)>

# (static) initWithAppId(appId) → {Promise.<(AuthResponse|null)>}

Initializes the SDK.
Parameters:
Name Type Description
appId string GetSocial App ID
Source:
Returns:
Promise with the authenticated user and referral information (if any)
Type
Promise.<(AuthResponse|null)>

# (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>