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

Etsy client not usable thread-safely with multiple API keys #29

Open
Muon opened this issue Mar 1, 2012 · 5 comments
Open

Etsy client not usable thread-safely with multiple API keys #29

Muon opened this issue Mar 1, 2012 · 5 comments

Comments

@Muon
Copy link
Collaborator

Muon commented Mar 1, 2012

Using multiple API credentials with the client is currently impossible to do thread-safely since everything is in the global module. I propose creating an Etsy::Client class, like the Twitter gem's Twitter::Client. This would permit creating separate instances of it for the multi-key use case, and an instance of it could be stuffed in the module to keep backwards compatibility.

@kytrinyx
Copy link
Collaborator

Something like this?

client = Etsy::Client.new(:api_key => 'key', :secret  => 'secret', :environment => :production)

client.get '/taxonomy/tags', :limit => 5

@Muon
Copy link
Collaborator Author

Muon commented Jul 11, 2012

Sort of, but also including the methods currently accessible through the module interface like:

client = Etsy::Client.new(:api_key => 'key', :secret  => 'secret', :environment => :production)

client.user('littletjane')

@orendon
Copy link

orendon commented Aug 31, 2013

hi, any plans to include this in further releases?

@kytrinyx
Copy link
Collaborator

Nobody tested the branch, so I didn't want to release it. I don't have any etsy apps anymore, so I can't really test it against any sort of real usage, and I don't want to inadvertently break people's production apps.

@trobrock
Copy link
Collaborator

trobrock commented Sep 1, 2013

Same for myself, I'm not actively using the etsy api myself so we were just waiting on some regression testing.

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

No branches or pull requests

4 participants