Sign in

APIs

AuthApi

Constructor

It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.

public AuthApi(Configuration config);
Parameters

config Configuration

The API key for your application. You can generate an API key in the Admin Panel for your application. Please note: Don’t expose the API key in unsecure environments like Web Apps.

GenerateAccessToken

public AccessToken|Error GenerateAccessToken(ForeignUserIdentifier body);
Parameters

body ForeignUserIdentifier

Foreign user identifier.

Returns

In case of a success, this function returns an instance of AccessToken. In case of a failure, this function returns an instance of Error or Error or .

GetUserChallengeNotificationTopic

public NotificationTopic|Error GetUserChallengeNotificationTopic(string challenge_id?);

Get a topic to be used with an MQTT client to receive real time updates whenever a challenge changes.

Parameters

challenge_id string OPTIONAL

The challenge id you want to get notified

Returns

In case of a success, this function returns an instance of NotificationTopic. In case of a failure, this function returns an instance of Error or Error.

GetUseBattlePassNotificationTopic

public NotificationTopic|Error GetUseBattlePassNotificationTopic(string battle_pass_id);

Get a topic to be used with an MQTT client to receive real time updates whenever a battle pass changes.

Parameters

battle_pass_id string

The battle pass you want to get notified

Returns

In case of a success, this function returns an instance of NotificationTopic. In case of a failure, this function returns an instance of Error or Error.

EventsApi

Constructor

It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.

public EventsApi(Configuration config);
Parameters

config Configuration

The API key for your application. You can generate an API key in the Admin Panel for your application. Please note: Don’t expose the API key in unsecure environments like Web Apps.

SendEvent

public ActionResponse|UnknownChallengeError SendEvent(EventPayload body);

Post an event to the SCILL backend

Parameters

body EventPayload

Event payload

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of or UnknownChallengeError.

ChallengesApi

Constructor

It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.

public ChallengesApi(Configuration config);
Parameters

config Configuration

You need to provide an access token that you previously generated with the EventsApi. Please check out the documentation about access tokens for more info.

GetPersonalChallenges

public ChallengeCategory[]|Error GetPersonalChallenges(string appId);

Get personal challenges organized in categories

Parameters

appId string

The app id

Returns

In case of a success, this function returns an instance of ChallengeCategory[]. In case of a failure, this function returns an instance of Error or Error.

GetPersonalChallengeById

public Challenge|Error GetPersonalChallengeById(string appId, string challengeId);

Get personal challenges organized in categories

Parameters

appId string

The app id

challengeId string

The challenge id (see challenge_id of Challenge object)

Returns

In case of a success, this function returns an instance of Challenge. In case of a failure, this function returns an instance of Error or Error.

GetActivePersonalChallenges

public ChallengeCategory[]|Error GetActivePersonalChallenges(string appId);

Get active personal challenges organized in categories

Parameters

appId string

The app id

Returns

In case of a success, this function returns an instance of ChallengeCategory[]. In case of a failure, this function returns an instance of Error or Error.

UnlockPersonalChallenge

public ActionResponse|Error UnlockPersonalChallenge(string appId, string challengeId);

Unlock a personal challenge by product id and challenge id

Parameters

appId string

The app id

challengeId string

The challenge id (see challenge_id of Challenge object)

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of Error or Error.

ActivatePersonalChallenge

public ActionResponse|Error ActivatePersonalChallenge(string appId, string challengeId);

Activate a personal challenge by product id and user challenge id

Parameters

appId string

The app id

challengeId string

The challenge id (see challenge_id of Challenge object)

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of Error or Error.

CancelPersonalChallenge

public ActionResponse|Error CancelPersonalChallenge(string appId, string challengeId);

Cancel an active personal challenge by product id and user challenge id

Parameters

appId string

The app id

challengeId string

The challenge id (see challenge_id of Challenge object)

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of Error or Error.

ClaimPersonalChallengeReward

public ActionResponse|Error ClaimPersonalChallengeReward(string appId, string challengeId);

Claim the reward of a finished personal challenge by product id and user challenge id

Parameters

appId string

The app id

challengeId string

The challenge id (see challenge_id of Challenge object)

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of Error or Error.

GenerateWebsocketAccessToken

public SocketToken|Error GenerateWebsocketAccessToken();

Get an access token for the Websockets server notifying of updates in real time

Returns

In case of a success, this function returns an instance of SocketToken. In case of a failure, this function returns an instance of Error or Error.

BattlePassesApi

Constructor

It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.

public BattlePassesApi(Configuration config);
Parameters

config Configuration

You need to provide an access token that you previously generated with the EventsApi. Please check out the documentation about access tokens for more info.

GetBattlePasses

public BattlePass[]|Error GetBattlePasses(string appId);

Get battle passes for the product

Parameters

appId string

The app id

Returns

In case of a success, this function returns an instance of BattlePass[]. In case of a failure, this function returns an instance of Error or Error.

GetActiveBattlePasses

public BattlePass[]|Error GetActiveBattlePasses(string appId);

Get active battle passes for the app

Parameters

appId string

The app id

Returns

In case of a success, this function returns an instance of BattlePass[]. In case of a failure, this function returns an instance of Error or Error.

GetUnlockedBattlePasses

public BattlePass[]|Error GetUnlockedBattlePasses(string appId);

Get unlocked battle passes for the user encoded in the access token

Parameters

appId string

The app id

Returns

In case of a success, this function returns an instance of BattlePass[]. In case of a failure, this function returns an instance of Error or Error.

GetBattlePass

public BattlePass|Error GetBattlePass(string appId, string battlePassId);

Get battle pass for the product with id

Parameters

appId string

The app id

battlePassId string

The id of the battle pass. It’s the same as in battle_pass_id you received in earlier requests (i.e. getting all active battle passes for a product).

Returns

In case of a success, this function returns an instance of BattlePass. In case of a failure, this function returns an instance of Error or Error.

GetBattlePassLevels

public BattlePassLevel[]|Error GetBattlePassLevels(string appId, string battlePassId);

Get battle pass levels for a battle pass

Parameters

appId string

The app id

battlePassId string

The id of the battle pass. It’s the same as in battle_pass_id you received in earlier requests (i.e. getting all active battle passes for a product).

Returns

In case of a success, this function returns an instance of BattlePassLevel[]. In case of a failure, this function returns an instance of Error or Error.

GetAllBattlePassLevels

public BattlePassLevel[]|Error GetAllBattlePassLevels(string appId);

Get all battle pass levels for an app

Parameters

appId string

The app id

Returns

In case of a success, this function returns an instance of BattlePassLevel[]. In case of a failure, this function returns an instance of Error or Error.

ActivateBattlePassLevel

public ActionResponse|Error ActivateBattlePassLevel(string appId, string levelId);

Activate a given battle pass level by id

Parameters

appId string

The app id

levelId string

The id of the battle pass level.

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of Error or Error.

ClaimBattlePassLevelReward

public ActionResponse|Error ClaimBattlePassLevelReward(string appId, string levelId);

Claim the battle pass level id

Parameters

appId string

The app id

levelId string

The id of the battle pass level.

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of Error or Error.

UnlockBattlePass

public BattlePassUnlockInfo|Error UnlockBattlePass(string appId, string battlePassId);

Unlock the battle pass for a user

Parameters

appId string

The app id

battlePassId string

The id of the battle pass. It’s the same as in battle_pass_id you received in earlier requests (i.e. getting all active battle passes for a product).

Returns

In case of a success, this function returns an instance of BattlePassUnlockInfo. In case of a failure, this function returns an instance of Error or Error or Error.