Play To Win

When someone enters into a play to win drawing for a LibraryGame, we need to track it. Play To Wins are accessed via /api/playtowin.

Properties

See "Object Properties" in Introduction for basic shared properties.

Complete details in PlayToWinProperties.

Related Objects

See "Related Objects" in Introduction for how to use them.

badge

The Badge associated with this play to win, if any.

convention

The Convention associated with this play to win, if any.

library

The Library this play to win belongs to.

librarygame

The LibraryGame this play to win belongs to.

user

The User associated with this play to win, if any.

Services

The services used to fetch and manipulate play to wins.

Search Play To Wins

This will search across all libraries. To search on a single library see "Relationships" in Library.

 GET /api/playtowin
Optional Params
query

Searches a partial name.

Returns:

 {
    "paging" : {...},
    "items" : [
        {
          "id" : "xxx",
          "name" : "Andy Dufresne",
          ...
        },
        ...
    ]
 }

Create Play To Win

 POST /api/playtowin
Required Params
library_id
librarygame_id
renter_name

Returns the same as a normal read.

Read Play To Win

 GET /api/playtowin/xxx

Returns:

 {
   "id" : "xxx",
   "name" : "Andy Dufresne",
   ...
 }

Update Play To Win

 PUT /api/playtowin/xxx

Returns the same as a normal read.

Delete Play To Win

 DELETE /api/playtowin/xxx

Returns:

 {
   "success" : 1
 }