APIs
AuthApi
constructor
It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.
new AuthApi(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
AccessToken|Error generateAccessToken(ForeignUserIdentifier body);
Parameters
body ForeignUserIdentifier
Foreign user identifier.
Returns
AccessToken or Error
getUserChallengeNotificationTopic
NotificationTopic|Error getUserChallengeNotificationTopic(string challenge_id);
Get a topic to be used with an MQTT client to receive real time updates whenever the challenge changes.
Parameters
challenge_id string
The challenge id you want to get notified
Returns
getUserChallengesNotificationTopic
NotificationTopic|Error getUserChallengesNotificationTopic();
Get a topic to be used with an MQTT client to receive real time updates whenever challenges for the user provided by the access token change.
Returns
getUserBattlePassNotificationTopic
NotificationTopic|Error getUserBattlePassNotificationTopic(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
EventsApi
constructor
It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.
new EventsApi(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
ActionResponse|UnknownChallengeError sendEvent(EventPayload body);
Post an event to the SCILL backend
Parameters
body EventPayload
Event payload
Returns
ActionResponse or UnknownChallengeError
getAvailableEvents
EventDescription[] getAvailableEvents();
Get all available events and required and optional properties
Returns
ChallengesApi
constructor
It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.
new ChallengesApi(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
ChallengeCategory[]|Error getPersonalChallenges(string appId);
Get personal challenges organized in categories
Parameters
appId string
The app id
Returns
getUnresolvedPersonalChallenges
ChallengeCategory[]|Error getUnresolvedPersonalChallenges(string appId);
Get personal challenges organized in categories that are not yet finished
Parameters
appId string
The app id
Returns
getAllPersonalChallenges
ChallengeCategory[]|Error getAllPersonalChallenges(string appId);
Get personal challenges organized in categories that are not yet finished
Parameters
appId string
The app id
Returns
getPersonalChallengeById
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
getActivePersonalChallenges
ChallengeCategory[]|Error getActivePersonalChallenges(string appId);
Get active personal challenges organized in categories
Parameters
appId string
The app id
Returns
unlockPersonalChallenge
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
activatePersonalChallenge
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
cancelPersonalChallenge
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
claimPersonalChallengeReward
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
generateWebsocketAccessToken
SocketToken|Error generateWebsocketAccessToken();
Get an access token for the Websockets server notifying of updates in real time
Returns
SocketToken or Error
BattlePassesApi
constructor
It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.
new BattlePassesApi(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
BattlePass[]|Error getBattlePasses(string appId);
Get battle passes for the product
Parameters
appId string
The app id
Returns
getActiveBattlePasses
BattlePass[]|Error getActiveBattlePasses(string appId);
Get active battle passes for the app
Parameters
appId string
The app id
Returns
getUnlockedBattlePasses
BattlePass[]|Error getUnlockedBattlePasses(string appId);
Get unlocked battle passes for the user encoded in the access token
Parameters
appId string
The app id
Returns
getBattlePass
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
BattlePass or Error
getBattlePassLevels
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
getAllBattlePassLevels
BattlePassLevel[]|Error getAllBattlePassLevels(string appId);
Get all battle pass levels for an app
Parameters
appId string
The app id
Returns
activateBattlePassLevel
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
claimBattlePassLevelReward
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
unlockBattlePass
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).