Comments (5)
Okay my fault.. it is possible to configure the host for getting different results depending on the language.
For others:
ASIN::Configuration.configure do |config|
config.secret = Rails.application.secrets.amazon["secret_access_key"]
config.key = Rails.application.secrets.amazon["access_key_id"]
config.associate_tag = Rails.application.secrets.amazon["associate_tag"]
config.host = "webservices.amazon.de"
end
This would return german results.
Do you have a list of all possible hosts? And maybe you can update your README - the optional host configuration is not mentioned anywhere.
from asin.
@mattherick I've found a list, but I think it's incomplete because I think I remember there being an Indian endpoint that isn't listed there. http://docs.aws.amazon.com/AWSECommerceService/latest/DG/AnatomyOfaRESTRequest.html
from asin.
Springboarding off of this, what if I want to change it dynamically at runtime? I have users from all across the world, and I'd like to serve up their country's version if there is one. Could I do something like this at runtime to change which site I query just for that specific user?
ASIN::Configuration.configure do |config|
config.host = "webservices.amazon.de"
end
from asin.
👍
from asin.
@jaimerump @kurtfunai ❤️ for helping!
confiture has a feature that allows you to set block-scoped configuration. it's also thread-safe:
ASIN::Configuration.with_config(host: "webservices.amazon.de") do
client.lookup('B0096BYG7C').first.detail_page_url # http://www.amazon.de/Practical...
end
from asin.
Related Issues (20)
- Readme correction for properly finding the Formatted Price HOT 3
- Response not contain image product HOT 3
- Prevent stdout logging HOT 1
- How to gracefully handle response errors? HOT 2
- simplify asin
- Care required with dependent module versioning when using excon with httpi HOT 2
- Example are broken ... HOT 14
- Question: Getting lowest new price including shipping HOT 1
- Latest Amazon changes to product API seemed to result in errors HOT 13
- How can I pull image url(s) ? HOT 7
- Too much debug info HOT 4
- check compatibility with new AWS certificates HOT 1
- SearchBins Response Group does not return any Search Bins HOT 5
- Hashie::Rash namespace collision in newer versions of Hashie & Rash gems HOT 2
- empty price for some asin HOT 2
- How to get list of products for a particular store only HOT 3
- SignatureDoesNotMatch HOT 7
- Maybe it's a good idea to change XML serialization library? HOT 2
- Will ASIN support the Product Advertising API 5.0? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asin.