This branch of the API deals with meta information about TGC products.
GET /api/tgc/products
If you want to build an interface for uploading to TGC's printed compoonents inside of a game, then this is the API you've been looking for. Each component in the system will be returned in this result set, and it should be cached as it doesn't change that often.
{ "result" : [ { "categories" : [ "Boards", "Folding" ], "child" : { "create_api" : "/api/twosided", "name" : "Accordion Board", "parent_id" : "set_id" }, "create_api" : "/api/twosidedset", "identity" : "AccordionBoard", "name" : "Accordion Board Set", "sides" : [ { "label" : "Face", "overlay" : "/overlays/accordionboard.png", "field" : "face" }, { "label" : "Back", "field" : "back", "overlay" : "/overlays/accordionboard.png" } ], "size" : { "pixels" : [2475, 4875] }, "_relationships" : { "self" : "/api/tgc/products/AcordionBoard" }, }, ... } ], }
The individual components have the following properties:
An array where the first element is a broad category to group components by, and each subsequent element gets more specific.
An optional object. If it exists it means this component is a set with child elements, like a deck with cards, or a book with pages, or a set with items.
A partial URL where you can do a POST
to create a child of this object.
The human readable name of this child object.
The name of the parent id for this child. Will be one of deck_id
, booklet_id
, book_id
, and set_id
.
A partial URL where you can do a POST
to create this object.
This must be passed to the create_api
as it identifies this component to The Game Crafter.
The human readable name of this component.
An array of the printed sides of the component. Each element in the array will also have these properties:
The field name for this side. It will be represented in several different forms. For example if it is called face
then it will have a face_id
and a has_proofed_face
and a face
object.
A human readable label for this side.
A partial URL to a transparent image that youc an overlay on top of the image you are uploading for proofing purposes.
A hash with an element called pixels
pointing to an array where the first element is the width of the component and te second is the height, both measured in pixels.
Depricated: Use the Component Schema API. This one will likely remain for a long time, but it will no longer be updated.
GET /api/tgc/printedcomponents
This endpoint returns a JSON hash of printed game components. Each key in the hash is the class name for the printed component, and the properties for the component are in a sub hash:
{ "result" : { "PokerDeck" : { "cut_type" : "steel", "photo_credit" : "Time Barons", "finished_size" : "2.5 x 3.5 in", "name" : "Poker Deck", "description" : "Poker cards are one of two defacto standard sizes around the world, the other being Bridge cards. We also have a line of poker card sized tuck boxes that are great for use with poker cards.", "size" : "825x1125", "group" : "decks", "card_class" : "PokerCard", "price_per_sheet" : "1.66", "notes" : "", "photo_link" : null, "weight" : null, "count_per_sheet" : 18, "material" : "305gsm black-core matt card stock", "method_name" : "pokerdecks", "templates" : { "Photoshop" : "poker-card.psd", "PNG" : "poker-card.png", "Illustrator" : "poker-card.ai", "SVG" : "poker-card.svg" } }, [...] }, },
How this printed component is cut. For example, steel cut, or laser cut.
Where does the default product photo come from?
Describes the Printed Component.
The size of the component as a string. "width"x"height"
The product group this components falls in.
For decks only, the name of the
The cost to produce one sheet of the Printed Component.
Any notes about the component. Limitations, frequently asked questions, detailed information.
An optional link to be displayed with the product photo.
How much one sheet of the component weighs. Many items will not have an explicit weight, like decks, where the weight depends on the number of cards in the deck.
How many components do you get per sheet?
What is the base material for this printed component?
Wing path fragment to access this component in the API. For example, the path /api/pokerdecks
will allow you to manipulate Poker Decks.
A hash of templates, by type. The base URL for a template is https://s3.amazonaws.com/www.thegamecrafter.com/templates/.
GET /api/tgc/printedcomponents/XXX
This endpoint returns a the properties of a particular Printed Component (XXX
) as JSON hash. See "api/tgc/printedcomponents" for a list of all properties.
/api/tgc/componentgroups
.This endpoint returns a JSON hash of Component Groups. Each "Printed Component" falls into a Component Group.
{ "result" : { "booklets" : { "info" : "http://help.thegamecrafter.com/article/80-booklets", "notes" : "Due to the nature of saddle stitching booklet pages are printed 4 to a sheet. Please be sure to indicate (in the 'Page Number' field) the order that the pages should appear in your booklet. Each page must be uploaded as a separate full bleed image. A 20-page booklet takes up the thickness of 4 cards in a box.", "name" : "Booklets", "description" : "Saddle stitched manuals." }, [...] } }
A link to the help page for the Component Group.
Notes about the Component Group.
The name of this group.
A description of the Component Group.
GET /api/tgc/componentgroups/XXX
Depricated: Component groups will be going away in the future. Use categories instead.
This endpoint returns a the properties of a particular Component Group (XXX
) as JSON hash. See "api/tgc/componentgroups" for a list of all properties.