-
Notifications
You must be signed in to change notification settings - Fork 47
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
API Response Restructure #79
Comments
@CodingCarter I will guess I will include this in I will assign this to you. Looking forward to this. |
Great, I have school right now, but I will have this done by tonight. |
No problem |
Hey @sno2 |
This is an enhancement issue and its not a priority for me. But I will most likely include this update in v2 of the API i.e. with GraphQL support. |
Okay I think you are right we should leave that for now. |
@Mayank0255 |
Is your feature request related to a problem? Please describe.
Currently, all character and episode endpoints just return the
character
/episode
json or anarray
of thecharacter
/episodes
that match the request.Describe the solution you'd like
I think that all correct responses should have one of the following formats:
or
Of course, the response
status
should match the correct status of the response. If we changed to doing this, though, then it would allow us to include errors in incorrect responses that doesn't look weird. For example, if I were getting data from a certain character, but I sent the request to/character/9999
, we only get a 502 Bad Gateway message. We should, however, return the following data:Edit: the
message
property could be swapped forerror
.Using statuses instead of errors allows an easier debugging process, as the developer can access the message and status that the servers sent.
I will work on a PR if this is deemed as needed by the community.
The text was updated successfully, but these errors were encountered: