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

WIP: Upcoming improvements #7

Open
julianfssen opened this issue Aug 9, 2021 · 2 comments
Open

WIP: Upcoming improvements #7

julianfssen opened this issue Aug 9, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@julianfssen
Copy link
Owner

julianfssen commented Aug 9, 2021

Hello!

Thanks for using this gem. This is my first gem so it's not the best in terms of quality and efficiency. With that in mind, I'm looking to improve the gem in the coming months:

ETA for v0.5: End of December 2021

  • Custom error handling: Create a custom error class to handle errors from CoinGecko's API. Currently, the errors are handled by Ruby which works, but may not identify the actual cause of the error.
  • Custom response object: Currently, the wrapper returns a JSON-parsed response. This works, but some may prefer having a custom response object (à la Octokit's response object) that comes with useful attributes and is smart enough to work with various Enumerable operations. This could be released in another version as some users may rely on the JSON-parsed response.
  • Pagination: Currently, results are returned as is from CoinGecko's API, with pagination only available if you include it as an option during method calls. This can be improved by introducing pagination to every (necessary) endpoint without the need for a page option. Instead, you can call response.next instead to get the next page or response.prev to go back. This is, however, just an idea and it may change as it is implemented.
  • HTTP client customization: Currently, the gem is relying on the internal HTTP module to fetch results with a simple HTTP.get call. This may not work well for repeated calls in a short span of time or if concurrency is needed. I'm looking to make the connection module customizable so it can be tweaked for your use cases.

These are the current tasks that are in my roadmap for this gem. Feel free to create issues or even submit PRs if you're interested. Thanks again for using this gem! :)

@julianfssen julianfssen added the enhancement New feature or request label Aug 9, 2021
@julianfssen julianfssen self-assigned this Aug 9, 2021
@julianfssen julianfssen pinned this issue Aug 9, 2021
@julianfssen
Copy link
Owner Author

Update: I'll also be adding support for authentication for CoinGecko's new premium plans. This will be coming very soon! :)

@julianfssen
Copy link
Owner Author

julianfssen commented Oct 30, 2021

v0.5 Roadmap

Better error handling

  • Custom error classes for the connection client (delegated via Faraday)
  • Custom error classes for the API's error responses

Improved response object

  • Custom response object for easy data access
  • Convenience methods for price-related data
  • Convenience methods for volume-related data
  • Convenience methods to search within response objects

Pagination

  • Add pagination in method calls
  • Add pagination in response objects

Target date for v0.5 improvements: End of December 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant