Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
api [2020/11/10 07:07]
Jeftaei
api [2020/11/12 22:59] (current)
vmsize [API Libraries]
Line 1: Line 1:
-==== Api Info ====+===== API Info =====
 API can be found [[https://api.strafes.net/|Here]]. To get an API key you can request one under the support tab on [[https://issues.strafes.net/|here]]. API can be found [[https://api.strafes.net/|Here]]. To get an API key you can request one under the support tab on [[https://issues.strafes.net/|here]].
  
 API Examples/How to get started: [[https://wiki.strafes.net/api_examples|here]] API Examples/How to get started: [[https://wiki.strafes.net/api_examples|here]]
  
-=== Extra Useful Info === +===== API Libraries ===== 
-==Users API Info==+ 
 +The API is documented using Swagger which means you can use the [[https://api.strafes.net/documentation.yaml|documentation file]] to automatically generate API clients for essentially every language. The [[https://editor.swagger.io/|Swagger Editor]] offers this functionality without needing to run any local tooling. 
 + 
 +===== Extra Useful Info ===== 
 + 
 +==== Users API Info ====
   *''/user/{userid}'' using this you can get the moderation state, id, and username of the specified user, this can be used to check if they are whitelisted or not.   *''/user/{userid}'' using this you can get the moderation state, id, and username of the specified user, this can be used to check if they are whitelisted or not.
  
-==Rank API Info==+==== Rank API Info ====
   * ''/rank'' This will get you a paged list of the top ranked players. This request requires a Style Id and a Game ID, a page is optional.   * ''/rank'' This will get you a paged list of the top ranked players. This request requires a Style Id and a Game ID, a page is optional.
   * ''/rank/{userid}'' This will get you info about a player most notably their rank, skill, and placement. This request requires a Style Id, User ID, and Game ID   * ''/rank/{userid}'' This will get you info about a player most notably their rank, skill, and placement. This request requires a Style Id, User ID, and Game ID
  
-==Time API Info==+==== Time API Info ====
   * ''/time/{timeid}'' This will give you info about a certain time. To get a Time Id you can request a users times and get the Time Ids from that. Requires a Time Id   * ''/time/{timeid}'' This will give you info about a certain time. To get a Time Id you can request a users times and get the Time Ids from that. Requires a Time Id
   * ''/time/{timeid}/rank'' This will get the rank of the time, not very useful or used very often. Requires Time Id   * ''/time/{timeid}/rank'' This will get the rank of the time, not very useful or used very often. Requires Time Id
Line 22: Line 27:
   * ''/time/user/{userid}/wr'' Gets all World Records from a user. Requires User Id, Style Id, and Game Id.   * ''/time/user/{userid}/wr'' Gets all World Records from a user. Requires User Id, Style Id, and Game Id.
  
-==Map API Info==+==== Map API Info ====
   * ''/map'' Gets a list of maps and extra info about them, most notably Creator, map id, and playcount. Optional Game Id, Page(200 Per page)   * ''/map'' Gets a list of maps and extra info about them, most notably Creator, map id, and playcount. Optional Game Id, Page(200 Per page)
   * ''/map/{mapid}'' Gets info about a certain map. Required Map Id   * ''/map/{mapid}'' Gets info about a certain map. Required Map Id
  
- +==== State Ids ====
- +
- +
-==State Ids==+
   * 0 - Normal   * 0 - Normal
   * 1 - Whitelisted   * 1 - Whitelisted
Line 35: Line 37:
   * 3 - Pending   * 3 - Pending
  
-==Style/Game Ids==+==== Style/Game Ids ====
   * Game Ids   * Game Ids
     * 1 - Bhop     * 1 - Bhop
Navigation