This is the first step to create a new Contest. Some fields are mandatory some are optional. You can check more about the Contests model in our API documentation Contests.
SETTINGS fields
EXAMPLES
» Name String
Mandatory
The Name of the Contest. The sample Javascript for the CompetitionLabs leaderboard shows this name. |
» Description String
Optional
The description of the Contest is used to explain the Contest to players. |
» Scoring strategy Enum
Mandatory
Scoring strategies populate the leaderboard according to the kind of competition you want to create. The basic one is “The sum of all the points a player scores during the contest” (Cumulative) where all points scored by participants are shown in the leaderboard. |
» Ranking Model
Mandatory
Ranking can be from the lowest to the highest score or the other way around. You can also rank participants who have the same score equally, or according to when they completed the last event. |
» Metadata Array[Object]
Optional
Used for storing information in your back-end system. |
APP Example:
Name | Summer Contest! |
Description | A contest to commemorate the end of summer! |
Scoring strategy | The sum of all the points a player scores during the contest (Cumulative) |
Ranking: Scores ranking order | Descending |
Ranking: Time ranking order | Ascending |
Ranking: Rank order by | Score first |
Ranking: Discard time when ranking | No |
Ranking: Discard score when ranking | No |
Metadata: Key | Summer |
Metadata: Value | 2 |
API Example:
{ "jsonClass": "Contest", ... "label": "Summer Contest", "description": "A contest to commemorate the end of summer!", "metadata": [ { "jsonClass": "Metadata", "key": "Summer", "value": "2" } ], "strategies": { "jsonClass": "Strategies", "strategyType": "TotalCumulative", "rankingStrategy": { "jsonClass": "RankingStrategy", "scoreDesc": true, "timeDesc": false, "scoreFirst": true, "ignoreTime": false, "ignoreScore": false }, "scoringStrategy": { "jsonClass": "ScoringStrategy", "limitUpdatesTo": 0, "sumBestXOf": 0, "lastUpdateTimeStamp": 0, "recordTimeWhenSumReaches": 0.0 } } ... }