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 .
GetUserChallengeNotificationTopic
public 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
In case of a success, this function returns an instance of NotificationTopic. In case of a failure, this function returns an instance of Error.
GetUserChallengesNotificationTopic
public 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
In case of a success, this function returns an instance of NotificationTopic. In case of a failure, this function returns an instance of Error.
GetUserBattlePassNotificationTopic
public 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
In case of a success, this function returns an instance of NotificationTopic. In case of a failure, this function returns an instance of Error.
GetLeaderboardNotificationTopic
public NotificationTopic|Error GetLeaderboardNotificationTopic(string leaderboard_id);
Get a topic to be used with an MQTT client to receive real time updates whenever the specified leaderboard changes.
Parameters
leaderboard_id string
The id of the leaderboard 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.
GetUserInfo
public UserInfo|Error GetUserInfo();
Returns additional info object with usernames and avatar image for a user which is used in the leaderboard system
Returns
In case of a success, this function returns an instance of UserInfo. In case of a failure, this function returns an instance of Error.
SetUserInfo
public UserInfo|Error SetUserInfo(UserInfo body);
Sets user info like username and avatar image which is returned as part of the user rankings in leaderboards.
Parameters
body UserInfo
UserInfo object stored in the SCILL database for the user
Returns
In case of a success, this function returns an instance of UserInfo. In case of a failure, this function returns an instance of 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 or team 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.
GetAvailableEvents
public List<EventDescription> GetAvailableEvents();
Get all available events and required and optional properties
Returns
In case of a success, this function returns an instance of List<EventDescription>. In case of a failure, this function returns an instance of .
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 List<ChallengeCategory>|Error GetPersonalChallenges(string appId, array include_categories?, array exclude_categories?, string language?);
Get personal challenges organized in categories
Parameters
appId string
The app id
include_categories array
A list of categories that should be included in the response. Only the categories provided will be returned
exclude_categories array
A list of categories that should be excluded from the response. All categories except those listed here will be returned
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of List<ChallengeCategory>. In case of a failure, this function returns an instance of Error.
GetUnresolvedPersonalChallenges
public List<ChallengeCategory>|Error GetUnresolvedPersonalChallenges(string appId, array include_categories?, array exclude_categories?, string language?);
Get personal challenges organized in categories that are not yet finished
Parameters
appId string
The app id
include_categories array
A list of categories that should be included in the response. Only the categories provided will be returned
exclude_categories array
A list of categories that should be excluded from the response. All categories except those listed here will be returned
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of List<ChallengeCategory>. In case of a failure, this function returns an instance of Error.
GetAllPersonalChallenges
public List<ChallengeCategory>|Error GetAllPersonalChallenges(string appId, array include_categories?, array exclude_categories?, string language?);
Get personal challenges organized in categories that are not yet finished
Parameters
appId string
The app id
include_categories array
A list of categories that should be included in the response. Only the categories provided will be returned
exclude_categories array
A list of categories that should be excluded from the response. All categories except those listed here will be returned
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of List<ChallengeCategory>. In case of a failure, this function returns an instance of Error.
GetPersonalChallengeById
public Challenge|Error GetPersonalChallengeById(string appId, string challengeId, string language?);
Get personal challenges organized in categories
Parameters
appId string
The app id
challengeId string
The challenge id (see challenge_id of Challenge object)
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
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.
GetActivePersonalChallenges
public List<ChallengeCategory>|Error GetActivePersonalChallenges(string appId, string language?);
Get active personal challenges organized in categories
Parameters
appId string
The app id
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of List<ChallengeCategory>. In case of a failure, this function returns an instance of Error.
UnlockPersonalChallenge
public ActionResponse|Error UnlockPersonalChallenge(string appId, string challengeId, string language?);
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)
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
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.
ActivatePersonalChallenge
public ActionResponse|Error ActivatePersonalChallenge(string appId, string challengeId, string language?);
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)
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
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.
CancelPersonalChallenge
public ActionResponse|Error CancelPersonalChallenge(string appId, string challengeId, string language?);
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)
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
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.
ClaimPersonalChallengeReward
public ActionResponse|Error ClaimPersonalChallengeReward(string appId, string challengeId, string language?);
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)
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
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.
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.
ResetUserAppChallenges
public ActionResponse|Error ResetUserAppChallenges(string appId, string userId);
Resets all challenges for the given app ID and user ID
Parameters
appId string
The app id
userId string
The user id (
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.
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 List<BattlePass>|Error GetBattlePasses(string appId, string language?);
Get battle passes for the product
Parameters
appId string
The app id
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of List<BattlePass>. In case of a failure, this function returns an instance of Error.
GetActiveBattlePasses
public List<BattlePass>|Error GetActiveBattlePasses(string appId, string language?);
Get active battle passes for the app
Parameters
appId string
The app id
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of List<BattlePass>. In case of a failure, this function returns an instance of Error.
GetUnlockedBattlePasses
public List<BattlePass>|Error GetUnlockedBattlePasses(string appId, string language?);
Get unlocked battle passes for the user encoded in the access token
Parameters
appId string
The app id
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of List<BattlePass>. In case of a failure, this function returns an instance of Error.
GetBattlePass
public BattlePass|Error GetBattlePass(string appId, string battlePassId, string language?);
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).
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
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.
GetBattlePassLevels
public List<BattlePassLevel>|Error GetBattlePassLevels(string appId, string battlePassId, string language?);
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).
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of List<BattlePassLevel>. In case of a failure, this function returns an instance of Error.
GetAllBattlePassLevels
public List<BattlePassLevel>|Error GetAllBattlePassLevels(string appId, string language?);
Get all battle pass levels for an app
Parameters
appId string
The app id
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of List<BattlePassLevel>. In case of a failure, this function returns an instance of Error.
ActivateBattlePassLevel
public ActionResponse|Error ActivateBattlePassLevel(string appId, string levelId, string language?);
Activate a given battle pass level by id
Parameters
appId string
The app id
levelId string
The id of the battle pass level.
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
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.
ClaimBattlePassLevelReward
public ActionResponse|Error ClaimBattlePassLevelReward(string appId, string levelId, string language?);
Claim the battle pass level id
Parameters
appId string
The app id
levelId string
The id of the battle pass level.
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
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.
UnlockBattlePass
public BattlePassUnlockInfo|Error UnlockBattlePass(string appId, string battlePassId, string language?);
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).
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
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.
Leaderboards V2Api
Constructor
It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.
public Leaderboards V2Api(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.
getleaderboardv2
public leaderboardv2results|Error getleaderboardv2(string leaderboardId, string startDate?, string endDate?, string aggregate?, number currentPage?, number currentPosition?, number pageSize?, string language?);
Provides the selected leaderboard V2 rankings for a specific leaderboard.
Parameters
leaderboardId string
The id of the leaderboard
startDate string
The starting date for fetching results.
endDate string
The ending date for fetching results.
aggregate string
The aggregate function for the calculation of the results - can be BEST (returns a single score - either the lowest if ASC sorting is used, or the highest if DESC is used) or SUM (default value - increments (sums up) the scores).
currentPage int
The page index starting at 1. The number of pageSize elements are returned for each page. Default value is 1
currentPosition int
The starting leaderboard position from which the results should be loaded. The number of results is controlled via the pageSize variable. This parameter overrides the currentPage parameter.
pageSize int
The number of elements per page. Default is 25.
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of LeaderboardV2Results. In case of a failure, this function returns an instance of Error.
getleaderboardsv2
public List<leaderboardv2results>|Error getleaderboardsv2(string startDate?, string endDate?, string aggregate?, number currentPage?, number currentPosition?, number pageSize?, string language?);
Returns an array of LeaderboardV2Results items defined for the application.
Parameters
startDate string
The starting date for fetching results.
endDate string
The ending date for fetching results.
aggregate string
The aggregate function for the calculation of the results - can be BEST (returns a single score - either the lowest if ASC sorting is used, or the highest if DESC is used) or SUM (default value - increments (sums up) the scores).
currentPage int
The page index starting at 1. The number of pageSize elements are returned for each page. Default value is 1
currentPosition int
The starting leaderboard position from which the results should be loaded. The number of results is controlled via the pageSize variable. This parameter overrides the currentPage parameter.
pageSize int
The number of elements per page. Default is 25.
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of List<LeaderboardV2Results>. In case of a failure, this function returns an instance of Error.
getleaderboardv2rankings
public List<leaderboardv2memberranking>|Error getleaderboardv2rankings(string memberType, string memberId, string startDate?, string endDate?, string aggregate?, string language?);
Returns an array of LeaderboardV2MemberRanking items defined for all leaderboards in the application specified for the user. If the member is not in the leaderboard, the rank will be -1 in the LeaderboardRanking object.
Parameters
memberType string
The member type, can be user or team (right now) and sets which leaderboards should be selected.
memberId string
Either the user_id or team_id you used when sending the events. The memberType flag identifies which one is used.
startDate string
The starting date for fetching results.
endDate string
The ending date for fetching results.
aggregate string
The aggregate function for the calculation of the results - can be BEST (returns a single score - either the lowest if ASC sorting is used, or the highest if DESC is used) or SUM (default value - increments (sums up) the scores).
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of List<LeaderboardV2MemberRanking>. In case of a failure, this function returns an instance of Error.
getleaderboardv2ranking
public leaderboardv2memberranking|Error getleaderboardv2ranking(string memberType, string memberId, string leaderboardId, string startDate?, string endDate?, string aggregate?, string language?);
Returns a LeaderboardV2MemberRanking item for the specified leaderboard. Use this route to get the position of a user of team in a specified leaderboard.
Parameters
memberType string
The member type, can be user or team (right now) and sets which leaderboards should be selected.
memberId string
Either the user_id or team_id you used when sending the events. The memberType flag identifies which one is used.
leaderboardId string
The id of the leaderboard
startDate string
The starting date for fetching results.
endDate string
The ending date for fetching results.
aggregate string
The aggregate function for the calculation of the results - can be BEST (returns a single score - either the lowest if ASC sorting is used, or the highest if DESC is used) or SUM (default value - increments (sums up) the scores).
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of LeaderboardV2MemberRanking. In case of a failure, this function returns an instance of Error.
resetleaderboardv2rankings
public ActionResponse|Error resetleaderboardv2rankings(string appId, string leaderboardId);
Deletes all leaderboard V2 data, i.e. reset the leaderboard V2.
Parameters
appId string
The application ID
leaderboardId string
The leaderboard ID
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.
LeaderboardsApi
Constructor
It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.
public LeaderboardsApi(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.
GetLeaderboard
public Leaderboard|Error GetLeaderboard(string leaderboardId, number currentPage?, number pageSize?, string startDate?, string endDate?, string language?);
Provides the current leaderboard rankings for a specific leaderboard.
Parameters
leaderboardId string
The id of the leaderboard
currentPage int
The page index starting at 1. The number of pageSize elements are returned for each page. Default value is 1
pageSize int
The number of elements per page. Default is 25.
startDate string
The starting date for fetching results.
endDate string
The ending date for fetching results.
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of Leaderboard. In case of a failure, this function returns an instance of Error.
GetLeaderboards
public List<Leaderboard>|Error GetLeaderboards(number currentPage?, number pageSize?, string startDate?, string endDate?, string language?);
Returns an array of Leaderboard items defined for the application.
Parameters
currentPage int
The page index starting at 1. The number of pageSize elements are returned for each page. Default value is 1
pageSize int
The number of elements per page. Default is 25.
startDate string
The starting date for fetching results.
endDate string
The ending date for fetching results.
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of List<Leaderboard>. In case of a failure, this function returns an instance of Error.
GetLeaderboardRankings
public List<LeaderboardMemberRanking>|Error GetLeaderboardRankings(string memberType, string memberId, string startDate?, string endDate?, string language?);
Returns an array of LeaderboardRanking items defined for all leaderboards in the application specified for the user. If the member is not in the leaderboard, the rank will be -1 in the LeaderboardRanking object.
Parameters
memberType string
The member type, can be user or team (right now) and sets which leaderboards should be selected.
memberId string
Either the user_id or team_id you used when sending the events. The memberType flag identifies which one is used.
startDate string
The starting date for fetching results.
endDate string
The ending date for fetching results.
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of List<LeaderboardMemberRanking>. In case of a failure, this function returns an instance of Error.
GetLeaderboardRanking
public LeaderboardMemberRanking|Error GetLeaderboardRanking(string memberType, string memberId, string leaderboardId, string startDate?, string endDate?, string language?);
Returns a LeaderboardMemberRanking item for the specified leaderboard. Use this route to get the position of a user of team in a specified leaderboard.
Parameters
memberType string
The member type, can be user or team (right now) and sets which leaderboards should be selected.
memberId string
Either the user_id or team_id you used when sending the events. The memberType flag identifies which one is used.
leaderboardId string
The id of the leaderboard
startDate string
The starting date for fetching results.
endDate string
The ending date for fetching results.
language string
Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …
Returns
In case of a success, this function returns an instance of LeaderboardMemberRanking. In case of a failure, this function returns an instance of Error.
ResetLeaderboardRankings
public ActionResponse|Error ResetLeaderboardRankings(string memberType, string appId, string memberId);
Delete all leaderboard data, i.e. reset the leaderboard for the specified member.
Parameters
memberType string
The member type, can be user or team (right now) and sets which leaderboards should be selected.
appId string
The application ID
memberId string
Either the user_id or team_id you used when sending the events. The memberType flag identifies which one is used.
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.