Skip to content

joshlarson/gametree-rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GameTree

Create Player

Method: POST /players

Required Attributes

  • email
  • handle: This gets used as the ID on upload to Braintree's Sandbox

Example

Method: POST

URI: /players

Payload: {"email": "[email protected]", "handle": "foobar"}

Find Player By Email

Method: POST /players?email=<email>

Example

Method: GET

Path: /[email protected]

Response: {"id": 45, "email": "[email protected]", "handle": "foobar"}

Find Player By ID

Method: GET /players/<id>

Example

Method: GET

Path: /players/45

Response: {"id": 45, "email": "[email protected]", "handle": "foobar"}

Get Game

Method: GET /games/<game_id>

Example

Method: GET

Path: /games/120

Response: {"id": 120, "score": 100, "status": "in progress", "cost": 45}

Create Game

Method: POST /players/<player_id>/games

Update Games

Score Points

Method: POST /games/<game_id>/points {"points": <points>}

Add Charge to Game

Method: POST /games/<game_id>/charge {"amount": <cost>}

Finish Game

Method: POST /games/<game_id>/finish

Leaderboard

(In a browser)

Method: GET /leaderboard

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published