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

User API: move to primary document format #2593

Closed
ErisDS opened this issue Apr 15, 2014 · 2 comments · Fixed by #2682
Closed

User API: move to primary document format #2593

ErisDS opened this issue Apr 15, 2014 · 2 comments · Fixed by #2682
Assignees
Labels
affects:api Affects the Ghost API
Milestone

Comments

@ErisDS
Copy link
Member

ErisDS commented Apr 15, 2014

This issue is a result of the API format discussion in #2362, and is part of a larger project to move our API towards the JSON-API format which is documented in the Epic: #2124. This is one step in the journey towards achieving the User JSON object format laid out in #2349.


The equivalent task for Posts (#2580) has been done with the PR #2596 and should serve as an example of how to do this for Users.

The aim of this issue is to change the format of the user object in all requests and responses so that both the single user and user collection has the user object being contained in an array with the key users:

{
    users: [{...}]
}

This will involve changing the request format, changing the response format, updating all of the places in which the response is used, updating the tests and adding coverage where it is missing.

@ErisDS ErisDS added this to the 0.4 API milestone Apr 15, 2014
@ErisDS ErisDS added the api label Apr 15, 2014
@ErisDS
Copy link
Member Author

ErisDS commented Apr 16, 2014

Would really appreciate if you would add docs to this (#2125) as you go! Thanks 👍

@ErisDS ErisDS added the users label Apr 16, 2014
@javorszky
Copy link
Contributor

Willdo

@ErisDS ErisDS assigned ErisDS and unassigned javorszky Apr 28, 2014
ErisDS added a commit to ErisDS/Ghost that referenced this issue May 2, 2014
closes TryGhost#2593

- added new format to user API methods
- changed all places where the user api was used
- updated tests and added more coverage
- little bit of cleanup in utils/api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:api Affects the Ghost API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants