KongServices Class Reference

Inherits from NSObject
Declared in KongServices.h

Overview

This class is used to get general information about the Kongregate environment and the user. These methods should not be relied upon until the READY event has been received.

– getUsername

The Kongregate username for the current user.

- (NSString *)getUsername

Return Value

The username

Declared In

KongServices.h

– getUserId

The Kongregate user ID of the current user.

- (int64_t)getUserId

Return Value

The user id, or 0 if the user is a guest

Declared In

KongServices.h

– isGuest

Determines if the user is a guest on Kongregate.

- (bool)isGuest

Return Value

True if the user is a guest

Declared In

KongServices.h

– hasKongPlus

Determines if the user has a Kong+ account.

- (bool)hasKongPlus

Return Value

True if the user has a Kong+ account

Declared In

KongServices.h

– getGameAuthToken

Retrieves the game authentication token for the Kongregate user.

- (NSString *)getGameAuthToken

Return Value

The token

Discussion

Note: This will be a stub value for guests

Declared In

KongServices.h

– getNotificationCount

Retrieve the count of unread notifications for the current user

- (int32_t)getNotificationCount

Return Value

number of unread notifications

Declared In

KongServices.h

– hasUnreadGuildMessages

Check whether the user has unread guild messages

- (bool)hasUnreadGuildMessages

Return Value

true if the user has unread guild messages

Declared In

KongServices.h

– setCharacterToken:

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

- (void)setCharacterToken:(NSString *)characterToken

Parameters

characterToken

The JWT signed token

Declared In

KongServices.h