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

Allow for multiple clients #6

Merged
merged 1 commit into from
Sep 5, 2017

Conversation

wbowling
Copy link
Contributor

@wbowling wbowling commented Sep 5, 2017

We require multiple clients with different access tokens, so this PR allows for that while keeping backwards compatibility with the existing static calls.

def client
  @client ||= ShutterstockRuby::Client.new(access_token: access_token)
end

def search(q)
  client.videos.search(q)
end

@nadavshatz
Copy link
Member

Great stuff thanks for the PR!

@nadavshatz nadavshatz self-assigned this Sep 5, 2017
@nadavshatz nadavshatz merged commit fb00d94 into TailorBrands:master Sep 5, 2017
@nadavshatz
Copy link
Member

Released and pushed to rubygems.
https://github.com/TailorBrands/shutterstock-ruby/releases/tag/0.4.0

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

Successfully merging this pull request may close these issues.

2 participants