Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SRL API Documentation
- Checklist to Production
- * /ratings/:player
- - support for all time ? what does that make sense
- == Entrants ==
- INDEX /entrants
- [not implemented]
- GET /entrants/:id
- :id is race id
- Returns list of players participating in a race
- PUT /entrants/:id
- BODY
- enter : :playerName - Enters a player into a race
- ready : :playerName - Flags player as ready to race
- unready : :playerName - Unflags player as ready to race
- done : :playerName - Sets player as finished with the race
- undone : :playerName - Sets player as not finished with the race
- forfeit : :playerName - Allows the player to quit the race
- comment : :playerName - Sets a player comment about the race
- disqualify : :playerName - Disqualify a player from the race
- message : :string - Sets message about disqualification
- POST /entrants/:id
- [not implemented]
- DELETE /entrants/:id
- BODY
- entrant : playerName - Removes a player from a race
- == Games ==
- INDEX /games
- Returns un-paged list of all races games
- GET /games/:id
- :id is game abbreviation
- Return details about a specific game
- PUT /games/:id
- Creates a new game, or updates a game's full name
- BODY
- name : :string - The full name of the new game
- POST /games/:id
- [not implemented]
- DELETE /games/:id
- [not implemented]
- == Goalchanger ==
- INDEX /goalchanger
- [not implemented]
- GET /goalchanger/:id
- :id is game abbreviation
- Returns list of all race goals for a game in the active season
- PUT /goalchanger/:id
- Reassigns races with a certain race goal to a another goal (aka goal consolidation)
- BODY
- oldGoal : :int - The goal to be reassigned (to have 0 races after the call)
- newGoal : :int - The goal to transfer to all the races
- POST /goalchanger/:id
- [not implemented]
- DELETE /goalchanger/:id
- [not implemented]
- == Goals ==
- INDEX /goals
- [not implemented]
- GET /goals/:id
- :id is game abbreviation
- Returns most commonly races goals for a season
- QUERY STRING
- season : :int - The season of the top goals, or the active season if omitted
- PUT /goals/:id
- Creates a tracked goal for a game
- BODY
- goal : :string - The name/description of the goal to be raced
- POST /goals/:id
- [not implemented]
- DELETE /goals/:id
- [not implemented]
- == Leaderboard ==
- INDEX /leaderboard
- Returns the leaderboard for common race statistics
- QUERY STRING
- page : :int - Page of data to return; 1 if omitted
- pageSize : :int - Size of paged data to return; 100 if omitted
- sortField : :int - Statistic to sort on; vaild stats are 15 - Overall skill, 1 - number of races, 8 - number of wins, 6 - time played, 3 - unique games played
- order : :string - Largest to smallest or vice-versa; ASC by default, DESC also acceptable
- GET /leaderboard/:id
- :id is game abbreviation
- Returns the trueskill leaderboard for a game in a season
- QUERY STRING
- season : :int - Id of season, active seasons if omitted
- PUT /leaderboard/:id
- [not implemented]
- POST /leaderboard/:id
- [not implemented]
- DELETE /leaderboard/:id
- [not implemented]
- == Pastraces ==
- INDEX /pastraces
- Returns list of races from the past
- QUERY STRING
- page : :int - Page of data to return, 1 if omitted
- pageSize : :int - Size of page, 20 if omitted, 20 max
- season : :int - (optional) Id of the season in which the races took place
- game : :string - (optional) Abbreviation of the game for the races
- player : :string - (optional) Name of a player in the races
- seasongoal : :int - (optional) Id of the season featured goal for the race
- GET /pastraces/:id
- :id is the id of a specific past race
- Returns the details of an individual race
- PUT /pastraces/:id
- [not implemented]
- POST /pastraces/:id
- [not implemented]
- DELETE /pastraces/:id
- [not implemented]
- == Players ==
- INDEX /players
- [not implemented]
- GET /players/:id
- :id is the player's name
- Returns details about a specific player
- PUT /players/:id
- Changes a player's name
- BODY
- newName : :string - The new name of the player
- POST /players/:id
- [not implemented]
- DELETE /players/:id
- [not implemented]
- == Races ==
- INDEX /races
- Returns a list of all currently active races
- GET /races/:id
- :id is the id of the active race
- QUERY STRING
- lower : :string - (optional) Any value here sets player name keys in json to lowercase
- PUT /races/:id
- Changes the state of a race
- BODY
- filename : :string - Any value with flag a race as needing a filename
- game : :string - Set the game abbreviation of the race
- goal : :string - Set the race goal/description
- state : :int - Set the race state, 2 - Entry Close, 3 - In Progress, 4 - Complete, 5 - Race Over
- record : :string - Record the race
- rematch : :string - Clear entrants list, and set race state to Entry Open
- POST /races
- Creates a new race
- BODY
- game : :string - Game abbrevation of the game to be raced
- DELETE /races/:id
- Deletes a race
- == Ratings ==
- INDEX /ratings
- Returns a random champion of a game (#1 ranked player)
- GET /ratings/:id
- :id is a player name
- Returns the ratins of all played games for a player
- PUT /ratings/:id
- [not implemented]
- POST /ratings
- Test function for trueskill ratings
- DELETE /ratings/:id
- [not implemented]
- == Rtaleaderboards ==
- == Rtaleaderboardtags ==
- == Rtamilestones ==
- == Rtatimes ==
- == Rules ==
- INDEX /rules
- [not implemented]
- GET /rules/:id
- :id is game abbreviation
- Returns the rules for racing a game
- PUT /rules/:id
- [not implemented]
- POST /rules
- [not implemented]
- DELETE /rules/:id
- [not implemented]
- == Seasongoal ==
- INDEX /seasongoal
- [not implemented]
- GET /seasongoal/;id
- :id is the id of the season goal
- Get detailed information about a season goal including leaderboard
- PUT /seasongoal/:id
- [not implemented]
- POST /seasongoal
- Add a goal to a season to be tracked
- BODY
- season_id : :int - Id of the season to add the goal to
- goal_id : :int - Id of the goal to track in the season
- DELETE /seasongoal
- [not implemented]
- == Seasons ==
- INDEX /season
- Returns a list of previous seasons and the active season id
- GET /season/:id
- :id is the id of the season
- Returns detailed information about the season (like goals)
- PUT /season/:id
- [not implemented]
- POST /season
- Creates a new season with a name
- BODY
- season_name : :string - Name of the new season
- DELETE /season/:id
- [not implemented]
- == Stat ==
- INDEX /stat
- Returns various statistics for overall, players, or games
- QUERY STRING
- player : :string - (optional) Name of the player to get stats for
- game : :string - (optional) Abbreviation of the game to get statistics for
- GET /stat/monthly
- Returns month-over-month statistics
- PUT /stat/:
- [not implemented]
- POST /stat
- [not implemented]
- DELETE /stat
- [not implemented]
- == Streams ==
- INDEX /streams
- Returns a list of player names for a given list of stream names
- QUERY STRING
- channels : :string - Comma separated list of stream names
- GET /streams/:id
- :id is player name
- Returns the stream channel name of a player
- PUT /streams/:id
- Sets the stream channel name for a player
- BODY
- channel : :string - Channel name
- POST /streams
- [not implemented]
- DELETE /streams
- Removes the stream of a player
- BODY
- user : :string - Name of the player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement