Card

The child element of Decks are cards which are accessible via /api/card.

Card Properties

Each card has the following properties. Complete details in CardProperties.

id

The unique id for this card. It will never change.

wing_object_type

pokercard

date_created

A date when the card was created.

date_updated

A date when the card was last updated.

name

The name the card is known by.

deck_id

A Deck id. The unique id of a deck that this card belongs to.

quantity

An integer between 1 and 99. Defaults to 1. Allows for multiple copies of a card to be included in the deck.

back_from

Defaults to Deck. Allows the card to inherit a back from the deck, or set to Card to use one from the card itself. See Card Options below for details.

face_id

A File id. Sets the face image of the card. The ID is from a File. If a face_id is specified, then an extra property called face will be added which will briefly describe the image.

back_id

A File id. Sets the face image of the card. The ID is from a File. Not needed if back_from = Deck. If a back_id is specified, then an extra property called back will be added which will briefly describe the image.

has_proofed_face

A boolean indicating whether the face image has been verified by the user to be correct.

has_proofed_back

A boolean indicating whether the back image has been verified by the user to be correct.

Related Objects

deck

The Deck that this card is a member of.

Methods

The methods used to fetch and manipulate cards.

Options

Provides a list of the options that can be used to fill out various fields when creating or updating a card.

 GET /api/card/_options

Returns:

 {
    "back_from" : [...]
 }

NOTE: You can also get this data by adding _include_options=1 to the parameter list when fetching a card.

Create

 POST /api/card
session_id

Required. The unique session id provided by a Session method.

name

Required.

deck_id

Required.

quantity

Optional.

back_from

Optional.

face_id

Optional.

back_id

Optional.

has_proofed_face

Optional.

has_proofed_back

Optional.

Returns:

 {
   "id" : "xxx",
   "name" : "Rope",
   ...
 }

Update

 PUT /api/card/xxx

See Card for details.

Delete Card

 DELETE /api/card/xxx
session_id

Required. The unique session id provided by a Session method.

Returns:

 {
   "success" : 1
 }

Fetch

 GET /api/card/xxx
session_id

Optional. The unique session id provided by a Session method.

_include_options

Optional. See "Options" in Intro and Card Options above for details.

_include_relationships

Optional. See "Relationships" in Intro and Card Relationships above for details.

Returns:

 {
   "id" : "xxx",
   "name" : "Rope",
   ...
 }
^ Back to Top ^