Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to the API interface #1

Open
lmansur opened this issue Aug 8, 2018 · 1 comment
Open

Changes to the API interface #1

lmansur opened this issue Aug 8, 2018 · 1 comment
Assignees

Comments

@lmansur
Copy link
Member

lmansur commented Aug 8, 2018

@leandrost The API is undergoing some breaking changes to conform to the JSON:API spec. They are currently in the staging environment (https://got-board-api-sandbox.herokuapp.com/) for you to test. Let me know once you change the client to the new interface so I can deploy them to production.

Changes:

API

  • The value of the type identifier is now in singular instead of plural.
    Ex: "type" => "order" instead of "type" => "orders"

Game

  • No longer has the attribute id since there can't be an attribute with the same name as the id identifier [1]. You can still get the identifier via id outside the attributes object.
  • Creating a game no longer includes all related resources by default. To include them, you will need to list them in the include parameter. Ex: POST /games?include=territories,orders,units,garrison_tokens
  • The index endpoint has been removed for now.

Territory

  • No longer has the attribute game_id since they no longer belong to a single game.
  • No longer has the attribute id since there can't be an attribute with the same name as the id identifier [1]. You can still get the identifier via id outside the attributes object.
  • The attribute type changed to territory-type, since there can't be an attribute with the same name as the type identifier [1]

House

  • No longer has the attribute id since there can't be an attribute with the same name as the id identifier [1]. You can still get the identifier via id outside the attributes object.

Order

  • The attribute type changed to order-type, since there can't be an attribute with the same name as the type identifier [1]

Token

  • The attribute type changed to token-type, since there can't be an attribute with the same name as the type identifier [1]

Unit

  • No longer has the attribute id since there can't be an attribute with the same name as the id identifier [1]. You can still get the identifier via id outside the attributes object.
  • The attribute type changed to unit-type, since there can't be an attribute with the same name as the type identifier [1]
@leandrost leandrost self-assigned this Aug 19, 2018
@leandrost
Copy link
Member

@lmansur on it sir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants