Packagecom.kongregate.air
Interfacepublic interface IServices

This interface is used for getting and setting information about the user.



Public Methods
 MethodDefined By
  
Retrieves the game authentication token for the Kongregate user.
IServices
  
Gets the number of notifications for the current user.
IServices
  
getUserId():Number
The Kongregate user ID of the current user.
IServices
  
getUsername():String
The Kongregate username for the current user.
IServices
  
hasKongPlus():Boolean
Determines if the user has a Kong+ account.
IServices
  
Determines if the user has any unread guild chat messages.
IServices
  
isGuest():Boolean
Determines if the user is a guest on Kongregate.
IServices
  
setCharacterToken(characterToken:String):void
Updates the character token used for guild chat authentication.
IServices
Method Detail
getGameAuthToken()method
public function getGameAuthToken():String

Retrieves the game authentication token for the Kongregate user.

Returns
String — The token
getNotificationCount()method 
public function getNotificationCount():Number

Gets the number of notifications for the current user.

Returns
Number — the number of notifications for current user
getUserId()method 
public function getUserId():Number

The Kongregate user ID of the current user.

Returns
Number — The user id, or 0 if the user is a guest
getUsername()method 
public function getUsername():String

The Kongregate username for the current user.

Returns
String — The username
hasKongPlus()method 
public function hasKongPlus():Boolean

Determines if the user has a Kong+ account.

Returns
Boolean — True if the user has a Kong+ account
hasUnreadGuildMessages()method 
public function hasUnreadGuildMessages():Boolean

Determines if the user has any unread guild chat messages.

Returns
Boolean — true if the user has unread guild chat messages
isGuest()method 
public function isGuest():Boolean

Determines if the user is a guest on Kongregate.

Returns
Boolean — True if the user is a guest
setCharacterToken()method 
public function setCharacterToken(characterToken:String):void

Updates the character token used for guild chat authentication. This should be generated on your server and signed using JWT.

Parameters

characterToken:String — The JWT signed token