如何将 item_lookup 中的 IdType 从 ASIN 更改为 ISBN?

发布于 2024-08-03 02:34:52 字数 404 浏览 5 评论 0原文

我正在使用 Amazon Product Advertising API (amazon-ecs) Ruby 库 - 我该如何做将 item_lookup 中的 IdType 从 ASIN 更改为 ISBN?

做这样的事情:

Amazon::Ecs.item_lookup('9781934356166', :response_group => 'ItemAttributes,Images')

不确定在哪里将 IdType 的选项更改为 ISBN。我试过把它放在几个地方。

谢谢!

I'm using the Amazon Product Advertising API (amazon-ecs) Ruby library - how can I change the IdType in item_lookup from ASIN to ISBN?

Doing something like this:

Amazon::Ecs.item_lookup('9781934356166', :response_group => 'ItemAttributes,Images')

Not sure where to change the option for the IdType to ISBN. I've tried putting it several places.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

黯然#的苍凉 2024-08-10 02:34:52

查看 Amazon Product Advertising API(以前称为 ECS)文档,似乎您需要指定“ISBN”的 IdType 参数。我从来没有使用过这个特定的 gem,但我猜请求看起来像这样:

Amazon::Ecs.item_lookup('9781934356166', :response_group => 'ItemAttributes,Images', :id_type => 'ISBN')

根据文档“除 ASINx 之外的所有 IdTypes 都需要指定 SearchIndex”,所以您很可能需要这样做:

Amazon::Ecs.item_lookup('9781934356166', :response_group => 'ItemAttributes,Images', :id_type => 'ISBN', :search_index => 'Books')

Looking at the Amazon Product Advertising API (formerly ECS) docs, it seems you need to specify an IdType parameter of 'ISBN'. I've never used this particular gem, but I'm guessing the request would look something like this:

Amazon::Ecs.item_lookup('9781934356166', :response_group => 'ItemAttributes,Images', :id_type => 'ISBN')

According to the docs "All IdTypes except ASINx require a SearchIndex to be specified" so you'll most likely need to do this:

Amazon::Ecs.item_lookup('9781934356166', :response_group => 'ItemAttributes,Images', :id_type => 'ISBN', :search_index => 'Books')
尸血腥色 2024-08-10 02:34:52

我只是猴子修补了 gem 的源代码并创建了一个名为 item_lookup_isbn 的新方法,该方法与 item_lookup 相同(除了 asin 部分)。

I just monkey patched the gem's source and created a new method called item_lookup_isbn that was identical to the item_lookup except the asin part.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文