Methods
# (static) addOnInitializedListener(onInit)
Notifies callers when SDK finished initialization.
Parameters:
Name | Type | Description |
---|---|---|
onInit |
function | Function to be invoked. |
# (static) getCurrentUser() → {CurrentUser}
Current user.
Returns:
current user or null if SDK is not initialized.
- Type
- CurrentUser
# (static) getLanguage() → {string}
Returns current language of GetSocial plugin.
Returns:
currently used language.
- Type
- string
# (static) getSdkVersion() → {string}
Returns version of GetSocial SDK.
Returns:
: version as string.
- Type
- string
# (static) init(config) → {Promise.<(AuthResponse|null)>}
Initializes the SDK.
Parameters:
Name | Type | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
Properties
|
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 |
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.
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 |
Returns:
language code or error
- Type
- Promise.<string>