Game Part

Game parts are the relationship between Games and Parts.

Properties

Each gamepart has the following properties. Complete details in GamePartProperties.

id

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

wing_object_type

gamepart.

date_created

A date when the gamepart was created.

date_updated

A date when the gamepart was last updated.

quantity

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

game_id

A Game id. The id of the game associated with this gamepart.

part_id

A Part id. The id of the part associated with this gamepart.

part

A hash that is a brief representation of the part associated with this gamepart. It is provided so that when you get the list of gameparts for a game, you don't also have to make a call to Part.

Related Objects

game

The Game that uses this gamepart.

part

The Part that this gamepart references.

Game Part Methods

The methods used to fetch and manipulate gameparts.

Create Game Part

 POST /api/gamepart
session_id

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

part_id

Required.

NOTE: Multiple parts of the same part_id are not allowed as separate part gamepart entries. Therefore if you try to create a new game part with a part_id that already exists in the game, it will update the existing gamepart and return that as the result.

game_id

Required.

quantity

Optional.

Returns:

 {
   "id" : "xxx",
   "part" : { ... },
   ...
 }

Update Game Part

 PUT /api/gamepart/xxx

See Create Game Part for details.

Delete Game Part

 DELETE /api/gamepart/xxx
session_id

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

Returns:

 {
   "success" : 1
 }

Fetch Game Part

 GET /api/gamepart/xxx
session_id

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

_include_relationships

Optional. See "Relationships" in Intro and Game Part Relationships above for details.

Returns:

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