This documentation is automatically generated.
Output schemas only represent data
and not the full output; see output examples and the JSend specification.
Content-Type: application/json
Input Schema
{
"properties": {
"password": {
"type": "string"
},
"username": {
"type": "string"
}
},
"required": [
"username",
"password"
],
"type": "object"
}
Output Schema
{
"properties": {
"username": {
"type": "string"
}
},
"type": "object"
}
Notes
POST the required credentials to get back a cookie
username
: Usernamepassword
: Password
Input Schema
null
Output Schema
{
"type": "string"
}
Notes
GET to check if authenticated.
Should be obvious from status code (403 vs. 200).
Content-Type: application/json
Input Schema
{
"properties": {
"date": {
"type": "string"
},
"id": {
"type": "number"
},
"location": {
"type": "string"
}
},
"required": [
"date",
"location",
"id"
],
"type": "object"
}
Output Schema
{
"properties": {
"date": {
"type": "string"
},
"id": {
"type": "number"
},
"location": {
"type": "string"
}
},
"type": "object"
}
Notes
(Game host only) Update date and location of game
date
: Must be in YYYY-MM-DD formatlocation
id
: ID of game to change
Content-Type: application/json
Input Schema
{
"properties": {
"final_score": {
"type": "object"
},
"id": {
"type": "number"
}
},
"type": "object"
}
Input Example
{
"final_score": {
"Blue": 3,
"Red": 5
},
"id": 1
}
Output Schema
{
"type": "string"
}
Notes
(Game host only) POST to finalize game
Content-Type: application/json
Input Schema
null
Output Schema
{
"properties": {
"accepted_players": {
"type": "array"
},
"cancelled": {
"type": "boolean"
},
"date": {
"type": "string"
},
"final_score": {
"type": "string"
},
"host": {
"type": "string"
},
"id": {
"type": "number"
},
"location": {
"type": "string"
},
"teams": {
"type": "array"
}
},
"type": "object"
}
Notes
GET game with game_id
Content-Type: application/json
Input Schema
{
"properties": {
"decision": {
"enum": [
"Accept",
"Decline"
]
},
"id": {
"type": "number"
}
},
"type": "object"
}
Output Schema
{
"type": "string"
}
Notes
Decline or accept invite
id
: ID of game you want to respond to invite fordecision
: Either "Accept" or "Decline"
Content-Type: application/json
Input Schema
null
Output Schema
{
"type": "array"
}
Notes
GET array of IDs for open game invitations for self
Content-Type: application/json
Input Schema
null
Output Schema
{
"properties": {
"accepted_games": {
"type": "array"
},
"bio": {
"type": "string"
},
"birthday": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"first": {
"type": "string"
},
"games_hosted": {
"type": "array"
},
"gender": {
"type": "string"
},
"last": {
"type": "string"
},
"teams": {
"type": "array"
},
"username": {
"type": "string"
}
},
"type": "object"
}
Notes
(Player only) GET to retrieve player info
games
: Array of game IDs that player has acceptedteams
: Array of team names
Content-Type: application/json
Input Schema
{
"properties": {
"bio": {
"type": "string"
},
"birthday": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"first": {
"type": "string"
},
"gender": {
"enum": [
"M",
"F"
]
},
"last": {
"type": "string"
},
"password": {
"type": "string"
},
"username": {
"type": "string"
}
},
"required": [
"username",
"first",
"last",
"password",
"birthday",
"city",
"country"
],
"type": "object"
}
Output Schema
{
"properties": {
"username": {
"type": "string"
}
},
"type": "object"
}
Notes
PUT the required parameters to permanently register a new player
username
first
: First namelast
: Last namepassword
: Password for future loginsgender
: M/Fbirthday
: e.g., "1993-05-16"city
country
bio
Content-Type: application/json
Input Schema
{
"properties": {
"query": {
"type": "string"
}
},
"type": "object"
}
Output Schema
{
"type": "array"
}
Notes
Search for players whose name starts with query
Content-Type: application/json
Input Schema
{
"properties": {
"team_name": {
"type": "string"
}
},
"type": "object"
}
Output Schema
{
"properties": {
"game_id": {
"type": "number"
}
},
"type": "object"
}
Notes
Does matchmaking by finding a rival team for the provided team_name
,
creates a new game with the two teams and returns the game_id
for that game
Content-Type: application/json
Input Schema
{
"properties": {
"name": {
"type": "string"
},
"sport": {
"enum": [
"Basketball",
"Soccer"
]
},
"usernames": {
"type": "array"
}
},
"required": [
"usernames",
"name",
"sport"
],
"type": "object"
}
Output Schema
{
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
Notes
PUT to create a team
name
usernames
: list of players in team (INCLUDING YOURSELF!!)sport
: One of "Basketball" or "Soccer"
Input Schema
null
Output Schema
{
"properties": {
"games": {
"type": "array"
},
"losses": {
"type": "number"
},
"name": {
"type": "string"
},
"points_ratio": {
"type": "number"
},
"sport": {
"enum": [
"Basketball",
"Soccer"
]
},
"ties": {
"type": "number"
},
"usernames": {
"type": "array"
},
"wins": {
"type": "number"
}
},
"type": "object"
}
Notes
Get team with name
Content-Type: application/json
Input Schema
{
"properties": {
"name": {
"type": "string"
},
"sport": {
"enum": [
"Basketball",
"Soccer"
]
},
"usernames": {
"type": "array"
}
},
"required": [
"usernames",
"name",
"sport"
],
"type": "object"
}
Output Schema
{
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
Notes
PUT to create a team
name
usernames
: list of players in team (INCLUDING YOURSELF!!)sport
: One of "Basketball" or "Soccer"
Input Schema
null
Output Schema
{
"properties": {
"games": {
"type": "array"
},
"losses": {
"type": "number"
},
"name": {
"type": "string"
},
"points_ratio": {
"type": "number"
},
"sport": {
"enum": [
"Basketball",
"Soccer"
]
},
"ties": {
"type": "number"
},
"usernames": {
"type": "array"
},
"wins": {
"type": "number"
}
},
"type": "object"
}
Notes
Get team with name