-
Notifications
You must be signed in to change notification settings - Fork 195
Adding automatic API fallback, with minor refactor #141
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These intermediate classes allow for defining multiple providers, and overriding the implementation slightly for each one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defines list of providers to try in order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests just don't work. It appears the current API allows sending a future date and will just treat it as current. Commenting them out for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't match the data in the currencies.json file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convert now relies on get_rate rather than reimplementing the API call.
Logic is just overall simpler now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pulled this implementation from this PR: #127
thank you @Cruuncher this is awesome contribuion ihave been waiting for. We will review and release ASAP.
@ashwin31 Let me know if there's any changes you'd like!
The text of some exceptions may be different with this change
j-g00da
commented
Feb 27, 2024
Could anyone merge this?
Uh oh!
There was an error while loading. Please reload this page.
In this PR, we implement the ability for the API to automatically fallback to alternate APIs so that the probability of availability is higher. Adding new providers should be easy enough with this change