home fork us @github see our api
follow us on twitter

joysti.cc API Documentation



Create a Player

POST to http://joysti.cc/players.json - username is required

Response - key is needed for updating user/team/game details



Update a Player

PUT to http://joysti.cc/players/{id}.json - access_key is required

Response is Header 200 OK if successful, 401 Unauthorized if access_key is incorrect



Delete a Player

DELETE to http://joysti.cc/players/{id}.json - access_key is required

Response is Header 200 OK if successful, 401 Unauthorized if access_key is incorrect

Get a Player

GET to http://joysti.cc/players/{id}.json

Add a Player to a Team

POST to http://joysti.cc/players/{player id}/join_team.json - access_key, game_password, and team_id are required

Response



Add Score Points to a Player

POST to http://joysti.cc/players/{player id}/score.json - leader_id, access_key, and points are required where access_key is the key for the team leader and the player is on this leader's team

Response is Header 200 OK if successful, 401 Unauthorized if access_key is incorrect or if leader does not lead player's team






Create a Team

POST to http://joysti.cc/teams.json - game_password, game_id, name, and leader_id are required - leader_id must reference a valid Player and game_id must reference a valid Game

Response



Update a Team

PUT to http://joysti.cc/teams/{id}.json - player_id and access_key are required for verification - player_id must reference either the team leader or game owner

Response is Header 200 OK if successful, 401 Unauthorized if access_key is incorrect or if player is not team leader or game owner



Delete a Team

DELETE to http://joysti.cc/teams/{id}.json - player_id and access_key are required for verification - player_id must reference either the team leader or game owner

Response is Header 200 OK if successful, 401 Unauthorized if access_key is incorrect or if player does not have permissions



Get a Team

GET to http://joysti.cc/teams/{id}.json






Create a Game

POST to http://joysti.cc/games.json - name, password, and owner_id are required - owner_id must reference a valid Player

Response



Update a Game

PUT to http://joysti.cc/games/{id}.json - player_id and access_key are required for verification - player_id must reference game owner

Response is Header 200 OK if successful, 401 Unauthorized if access_key is incorrect or if player_id!=owner_id



Delete a Game

DELETE to http://joysti.cc/games/{id}.json - player_id and access_key are required for verification - player_id must reference game owner

Response is Header 200 OK if successful, 401 Unauthorized if access_key is incorrect or if player_id!=owner_id



Get a Game

GET to http://joysti.cc/games/{id}.json