Replies: 7 comments 8 replies
-
I agree with most (maybe all) of these ideas. I'd like to address before the next release. |
Beta Was this translation helpful? Give feedback.
-
I can start a pr, just need to know your preferred style (and of course, read over the code more x3) |
Beta Was this translation helpful? Give feedback.
-
I think this makes sense. Some methods were modeled after other APIs in the wild. Like blockchain dot info or mempool dot space. So, there is a lack of consistency. I do see the benefit of always returning a json especially for error handling. Of course it will break existing integrations but users can time their upgrades. |
Beta Was this translation helpful? Give feedback.
-
maybe the relevant methods should be marked as deprecated in the next release, and change in the release after? |
Beta Was this translation helpful? Give feedback.
-
Also, noticed |
Beta Was this translation helpful? Give feedback.
-
I've gone back and forth on the issue of including version numbers in API URLs, even moving forward with a candidate implementation. After this work, I've concluded AGAINST the URL-based versioning because I think it just adds too much complexity for a relatively simple, stable API. In line with semantic versioning, the API changes we're discussing here will still constitute a breaking, major version update to 2.x, but I think it's best for the URLs to remain unchanged. I'll try to ensure documentation for the next explorer update give clear guidance about the breaking changes. |
Beta Was this translation helpful? Give feedback.
-
Just committed a v2 of the API. Happy to hear any thoughts. 09a31f1 |
Beta Was this translation helpful? Give feedback.
-
Ahoy! uwu7
The API right now is a bit odd. Some endpoints return JSON, others return numbers, and other just strings. I feel it should all be JSON, to make it easier on languages and libraries that have a distinction. Some API methods could then be consolidated, reducing the number of requests needed. For example,
/blocks/tip/hash
and/blocks/tip/height
could be merged into/blocks/tip
returning both the header and the height in a JSON object.Also, if the price api is disabled, would it be better to return a error instead of a empty
object?
Beta Was this translation helpful? Give feedback.
All reactions