FORMAT: 1A HOST: http://api.forrest.io
forrest.io is an office ping-pong app
An individual Player object
- Parameters
- slug (required, string)
-
Response 200 (application/json)
-
Body
{ "name" : "Leslie Knope", "rating" : 25.06, "ranking" : 1, "results" : [ { "timestamp" : "2013-01-01T06:00Z", "teams" : [ { "score" : 21, "players" : [ { "name" : "Leslie Knope", "href" : "/players/leslie" } ] }, { "score" : 18, "players" : [ { "name" : "Ben Wyatt", "href" : "/players/ben" } ] } ] } ] }
-
- Response 204
A collection of Player objects
-
Response 200 (application/json)
[ { "name" : "Leslie Knope", "rating" : 25.06, "ranking" : 1, "href" : "/players/leslie" }, { "name" : "Ben Wyatt", "rating" : 24.43, "ranking" : 2, "href" : "/players/ben" } ]
-
Request (application/json)
-
Body
{ "name" : "Ron Swanson" }
-
-
Response 201 (application/json)
-
Header
Location: /players/ron
-
Body
{ "href" : "/players/ron" }
-
An individual Result object
- Parameters
- id (required, integer)
-
Response 200 (application/json)
-
Body
{ "href" : "/results/1", "timestamp" : "2013-01-01T12:00Z", "teams" : [ { "score" : 21, "players" : [ { "name" : "Leslie Knope", "href" : "/players/leslie" } ] }, { "score" : 18, "players" : [ { "name" : "Ben Wyatt", "href" : "/players/ben" } ] } ] }
-
A collection of Result objects
-
Response 200 (application/json)
[ { "href" : "/results/1", "timestamp" : "2013-01-01T12:00Z", "teams" : [ { "score" : 21, "players" : [ { "name" : "Leslie Knope", "href" : "/players/leslie" } ] }, { "score" : 18, "players" : [ { "name" : "Ben Wyatt", "href" : "/players/ben" } ] } ] } ]
-
Request (application/json)
-
Body
{ "teams" : [ { "score" : 21, "players" : [ { "name" : "Leslie Knope", "href" : "/players/leslie" } ] }, { "score" : 18, "players" : [ { "name" : "Ben Wyatt", "href" : "/players/ben" } ] } ] }
-
-
Response 201 (application/json)
-
Header
Location: /results/2
-
Body
{ "href" : "/results/2" }
-