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

changed to use new fixer.io api (old one was deprecated) #4

Closed
wants to merge 2 commits into from

Conversation

tannercorbin
Copy link

Hey all, this is the first time I've ever contributed or done a pull request so please let me know if I missed anything or didn't follow standards.

The master branch was using a deprecated API from fixer.io and therefore not working. I updated the code to use the api, but it now requires an api-key. So I made it so we grab an api key from the config file.

@cmerrick
Copy link
Contributor

Hi @tannercorbin, thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes.

@cmerrick
Copy link
Contributor

You did it @tannercorbin!

Thank you for signing the Singer Contribution License Agreement.

@timvisher
Copy link

Thanks for contributing, @tannercorbin!

@dmosorast Had actually taken a shot at this exact same patch a few weeks ago and was unable to get past a few API issues. Maybe they've gone away now? Here was his attempt.

Can you provide logs that show this working? A gist would work.

@dmosorast
Copy link
Contributor

To elaborate a bit, I ran into the first https_access_restricted error and added handling for it, then got the error base_currency_access_restricted mentioned here.

Looking at the new APIs error listing along with the base curency issue not listed in that page, it looked like it would be much more complicated than I originally anticipated, so I switched to exchangeratesapi.io, which is feature compatible with Fixer's old API.

@tannercorbin
Copy link
Author

Thanks guys. @dmosorast - I noticed the same thing with the base currency issue, but didn't even consider handling the other API error. Your code works as long as you have EUR base currency or use a paid account api key.
Here's a gist to show the output.

Again, this was my first time to try to contribute to a project so I learned a lot. How could I have known that @dmosorast already took a shot at this to avoid retracing his work? Any advice would be greatly appreciated.

Thanks!

@timvisher
Copy link

@tannercorbin This is looking good!

Can you update the README with setup instructions. Where do I go to get a Fixer.io API key? Tell me about the config.sample.json file, what its keys mean, and how I can run the tap with it.

Also, please get a Development section in documenting the use of virtualenvs. Something along these lines.


Regarding finding @dmosorast's work, honestly there's no great way to do it. One thing you can usually try is to use the Insights → Network page of the project to see if there's anything interesting going on, but honestly that only works on moderately inactive projects like this one. If there's a large number of forks or a very active development community then digesting that can be pretty difficult.

Another thing you can try is to submit an Issue before you work on the code. The maintainers of the project are often more aware of significant work being done on the project than you could possibly be, especially in the case of high-volume contribution projects. So making your first action nice and cheap ("Hey, I'm interested in fixing X, is anyone else already working on that?") can free you up or get you pointed in the right direction.

@timvisher
Copy link

Fixes #3

@timvisher
Copy link

@tannercorbin If you're looking for further opportunities to contribute, the changes you're making here would flow very nicely into singer-io/target-gsheet#6 and singer-io/singer-tap-template#3.

This would be more involved but since you're fixing Fixer.io anyway you may feel like taking a shot at it. :) singer-io/target-gsheet#1

@briansloane
Copy link

We're going to close this issue. Feel free to reopen if you make the suggested changes.

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

Successfully merging this pull request may close these issues.

5 participants