Packagecom.kongregate
Classpublic class KartridgeConstants
InheritanceKartridgeConstants Inheritance Object



Public Constants
 ConstantDefined By
  KONGREGATE_EMPTY_EVENT_PAYLOAD : String = {}
[static] An empty JSON event payload
KartridgeConstants
  KONGREGATE_EMPTY_STRING : String
[static] An empty NULL-terminated string
KartridgeConstants
  KONGREGATE_EVENT_AUTH_TOKEN : String = auth_token
[static] Event broadcast when the Kongregate authentication token is received or changed.
KartridgeConstants
  KONGREGATE_EVENT_CONNECTED : String = connected
[static] Event broadcast when the API has connected to the Kartridge application process.
KartridgeConstants
  KONGREGATE_EVENT_DISCONNECTED : String = disconnected
[static] Event broadcast when the API has disconnected from the Kartridge application process.
KartridgeConstants
  KONGREGATE_EVENT_ITEM_INSTANCES : String = item_instances
[static] Event broadcast when the list of item instances owned by the user changes.
KartridgeConstants
  KONGREGATE_EVENT_ITEMS : String = items
[static] Event broadcast when the list of items for the game is available, this will be fired after the API is initialized.
KartridgeConstants
  KONGREGATE_EVENT_LIBRARY : String = library
[static] Event broadcast when the list of currently owned or installed games has been updated.
KartridgeConstants
  KONGREGATE_EVENT_READY : String = ready
[static] Event broadcast when the API has been fully initialized and it has successfully communicated with the Kartridge application for the first time.
KartridgeConstants
  KONGREGATE_EVENT_SHUTDOWN : String = shutdown
[static] Event broadcast when the API is shutting down.
KartridgeConstants
  KONGREGATE_EVENT_USER : String = user
[static] Event broadcast once user information is available.
KartridgeConstants
  KONGREGATE_GUEST_USERNAME : String = Guest
[static] Username representing a guest user - "Guest"
KartridgeConstants
Constant Detail
KONGREGATE_EMPTY_EVENT_PAYLOADConstant
public static const KONGREGATE_EMPTY_EVENT_PAYLOAD:String = {}

An empty JSON event payload

KONGREGATE_EMPTY_STRINGConstant 
public static const KONGREGATE_EMPTY_STRING:String

An empty NULL-terminated string

KONGREGATE_EVENT_AUTH_TOKENConstant 
public static const KONGREGATE_EVENT_AUTH_TOKEN:String = auth_token

Event broadcast when the Kongregate authentication token is received or changed. If your game uses the token, it should authenticate with your server when this event is fired. This event can be fired if either the user or token changes. It will follow the KONGREGATE_EVENT_USER event if the user has changed as well. In general, if your application needs to use auth tokens, you can just listen for this event and ignore KONGREGATE_EVENT_USER.

See also

KONGREGATE_EVENT_CONNECTEDConstant 
public static const KONGREGATE_EVENT_CONNECTED:String = connected

Event broadcast when the API has connected to the Kartridge application process. This event is for advanced usage and can typically be ignored.

See also

KONGREGATE_EVENT_DISCONNECTEDConstant 
public static const KONGREGATE_EVENT_DISCONNECTED:String = disconnected

Event broadcast when the API has disconnected from the Kartridge application process. This event is for advanced usage and can typically be ignored.

See also

KONGREGATE_EVENT_ITEM_INSTANCESConstant 
public static const KONGREGATE_EVENT_ITEM_INSTANCES:String = item_instances

Event broadcast when the list of item instances owned by the user changes. This will happen when the API is initialized, when the current user purchases or consumes an item, or when the user changes. This event will be always be fired after KONGREGATE_EVENT_USER. When this event is fired it is good practice to enumerate the items and consume any unconsumed items since it is possible that items may have been awarded outside of the game via badges, customer services tools, etc. This event will not be fired if the game has not enabled the IAP API in the publishing settings.

See also

KONGREGATE_EVENT_ITEMSConstant 
public static const KONGREGATE_EVENT_ITEMS:String = items

Event broadcast when the list of items for the game is available, this will be fired after the API is initialized. Once this event is fired you may call KongregateIAP_GetItems to enumerate the items defined for the current game. This event will not be fired if the game has not enabled the IAP API in the publishing settings.

See also

KONGREGATE_EVENT_LIBRARYConstant 
public static const KONGREGATE_EVENT_LIBRARY:String = library

Event broadcast when the list of currently owned or installed games has been updated. This can happen when the current user installs/uninstalls/purchases a game, or when the user changes. In the latter case, this event will be always be fired after KONGREGATE_EVENT_USER.

See also

KONGREGATE_EVENT_READYConstant 
public static const KONGREGATE_EVENT_READY:String = ready

Event broadcast when the API has been fully initialized and it has successfully communicated with the Kartridge application for the first time. After this event is fired, KongregateAPI_IsReady will return true. Generally, you will want to wait for KONGREGATE_EVENT_USER or KONGREGATE_EVENT_AUTH_TOKEN if you need information about the current user.

See also

KONGREGATE_EVENT_SHUTDOWNConstant 
public static const KONGREGATE_EVENT_SHUTDOWN:String = shutdown

Event broadcast when the API is shutting down. This event is for advanced usage and can typically be ignored.

KONGREGATE_EVENT_USERConstant 
public static const KONGREGATE_EVENT_USER:String = user

Event broadcast once user information is available. Before this event is broadcast for the first time, users will be treated as guests. Once this event is received, the user ID and username returned will match the user that is logged into Kartridge (if any). This event will be fired again any time the user signs out or signs in with a different Kongregate account, so you should handle it accordingly. The game authentication token may not be available when this event is fired. If you need the authentication token, you should wait for the KONGREGATE_EVENT_AUTH_TOKEN event instead.

See also

KONGREGATE_GUEST_USERNAMEConstant 
public static const KONGREGATE_GUEST_USERNAME:String = Guest

Username representing a guest user - "Guest"