#16 - Add meta field to the json response.#44
Open
dgliwa wants to merge 2 commits intophalt:masterfrom
Open
Conversation
Owner
|
@dgliwa Hey! Thank you so much for your first contribution :) As this is changing how the API response format is, this could potentially break every integration that is looking for |
Author
|
Ah that makes sense. I added them back in. Thanks for the quick response. |
Owner
|
@dgliwa 💃 no problem! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey! This would be my first contribution. I was able to modify how the response is serialized to be formatted as follows:
{
"name": "Luke Skywalker",
"height": "172",
"mass": "77",
"hair_color": "blond",
"skin_color": "fair",
"eye_color": "blue",
"birth_year": "19BBY",
"gender": "male",
"homeworld": "http://localhost:8000/api/planets/1/",
"films": [
"http://localhost:8000/api/films/1/",
"http://localhost:8000/api/films/2/",
"http://localhost:8000/api/films/3/",
"http://localhost:8000/api/films/6/"
],
"species": [],
"vehicles": [
"http://localhost:8000/api/vehicles/14/",
"http://localhost:8000/api/vehicles/30/"
],
"starships": [
"http://localhost:8000/api/starships/12/",
"http://localhost:8000/api/starships/22/"
],
"url": "http://localhost:8000/api/people/1/",
"meta": {
"edited": "2014-12-20T21:17:56.891Z",
"created": "2014-12-09T13:50:51.644Z"
}
Please let me know if there is anything more/less I should do. Look forward to helping more if possible.