-
Notifications
You must be signed in to change notification settings - Fork 26
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
App key #21
base: master
Are you sure you want to change the base?
App key #21
Conversation
This should prevent users from having to pass the app_key into every request even when they've set it in the config. It also allows them to pass in an app_key if they've not gone through the config step, or they have multiple app_keys. Example: ```ruby Yotpo.configure do |config| config.app_key = ENV['yotpo_key'] config.secret = ENV['yotpo_secret'] end Yotpo.get_product_bottom_line(product_id: "fake-product") Yotpo.get_product_bottom_line(app_key: 'totallydifferentappkey', product_id: "fake-product") ```
If this is not desirable to anybody, I'll close it. Also happy to make any changes recommended. |
This seems like a good idea -- it's really strange that there are steps to configure the app key and secret, and then we must continue to pass it in for each call... |
@@ -1,3 +1,3 @@ | |||
module Yotpo | |||
VERSION = '1.0.1' | |||
VERSION = '1.0.2' |
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.
I would put the version change in a separate commit / PR.
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.
Why did Yotpo not use this PR? Coming to this gem now, and it seems crazy to provide a known key on each and every call.
This should prevent users from having to pass the app_key into every
request even when they've set it in the config. It also allows them to
pass in an app_key if they've not gone through the config step, or they
have multiple app_keys and wish to be explicit with which one they use.
Example: