You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think it matters too much, really. The code, data, error
abstraction is helpful for go-maxcdn, but certainly not required. It allows
for a simple generic response object, while enabling the consumer to parse
the data in a custom and abstracted way. Removing it though would result in
a cleaner response, as long as the following are met:
HTTP status code and status message are accurate and helpful.
On error, an error field is returned, something like '{ "error": {
"type": "type message", "message": "error description" } }' as you return
now.
Most importantly, they're consistent, which is the issue now. Start
building out 'v3' under the new format, but don't release it until all
endpoints are available, or call it 'alpha' ( /v3-alpha/... ) or or
something.
@jmervinehttps://github.com/jmervine In your experience with API's,
which format would you prefer? We were hoping to get rid of the code and
data levels in our v3 api rewrite.
—
Reply to this email directly or view it on GitHub #21 (comment).
If you look at a logs result:
Note that it's missing
code
anddata
keys that the other endpoints have...e.g. /account.json/address
The text was updated successfully, but these errors were encountered: