Git Product home page Git Product logo

rapa's Introduction

Rapa

CircleCI Gem Version Documentation

An API client library for Amazon Product Advertising API, written in Ruby.

See the official documents for more details about Amazon Product Advertising API.

Installation

Add this line to your application's Gemfile:

gem "rapa"

And then execute:

bundle

Or install it yourself as:

gem install rapa

Usage

Rapa::Client.new

Available options:

  • :access_key_id
  • :associate_tag
  • :secret_access_key

Returns a Rapa::Client.

require "rapa"
client = Rapa::Client.new(
  access_key_id: "...",
  associate_tag: "...",
  secret_access_key: "...",
)

Rapa::Client#list_items

Available options:

  • :id_type
  • :item_ids
  • :domain
  • :related_item_page
  • :relationship_type
  • :response_groups
  • :search_index

Returns a Rapa::Responses::ListItemsResponse.

response = client.list_items(
  item_ids: ["..."],
  domain: "...",
  response_groups: ["..."],
)

Rapa::Client#lookup_browse_node

Available options:

  • :browse_node_id
  • :domain
  • :response_groups

Returns a Rapa::Responses::LookupBrowseNodeResponse.

response = client.lookup_browse_node(
  browse_node_id: "...",
  domain: "...",
  response_groups: ["..."],
)

Rapa::Client#search_items

Available options:

  • :browse_node_id
  • :domain
  • :item_page
  • :keywords
  • :power
  • :related_item_page
  • :relationship_type
  • :response_groups
  • :search_index

Returns a Rapa::Responses::SearchItemsResponse.

response = client.search_items(
  domain: "...",
  keywords: ["..."],
  response_groups: ["..."],
)

Rapa::Responses::LookupBrowseNodeResponse

Available methods:

  • #error
  • #has_error?
  • #has_valid_request?
  • #response_group(group)

Rapa::Responses::SearchItemsResponse

Available methods:

  • #error
  • #has_error?
  • #has_valid_request?
  • #total_pages
  • #total_results

Rapa::Resources::BrowseNodeResource

Available methods:

  • #asin
  • #author
  • #eook?
  • #product_group
  • #title
  • #url_details_page

Rapa::Resources::ItemResource

Available methods:

  • #adult_product?
  • #alternate_versions
  • #asin
  • #authors
  • #binding
  • #browse_nodes
  • #creators
  • #creator_name
  • #creator_role
  • #ean
  • #ebook?
  • #episode_sequence
  • #genre
  • #has_customer_reviews?
  • #image_hi_res
  • #image_large
  • #image_medium
  • #image_small
  • #image_swatch
  • #image_thumbnail
  • #image_tiny
  • #isbn
  • #item_height
  • #item_length
  • #item_width
  • #label
  • #languages
  • #manufacturer
  • #number_of_pages
  • #package_height
  • #package_length
  • #package_weight
  • #package_width
  • #price_lowest_collectible
  • #price_lowest_new
  • #price_lowest_used
  • #product_group
  • #product_type_name
  • #publication_date
  • #publisher
  • #related_item_count
  • #related_item_page
  • #related_item_page_count
  • #related_items
  • #relationship
  • #relationship_type
  • #release_date
  • #running_time
  • #sales_rank
  • #season_sequence
  • #similar_products
  • #studio
  • #title
  • #url_add_to_wishlist
  • #url_all_customer_reviews
  • #url_all_offers
  • #url_customer_reviews_iframe
  • #url_details_page
  • #url_tell_a_friend

Hints

Domain

Available :domain option examples:

  • "ca"
  • "cn"
  • "co.jp"
  • "co.uk"
  • "com"
  • "com.br"
  • "com.mx"
  • "de"
  • "es"
  • "fr"
  • "in"
  • "it"

IdType

Available :id_type option examples:

  • "ASIN"
  • "EAN"
  • "ISBN"
  • "JAN"
  • "SKU"
  • "UPC"

SearchIndex

Available :search_index option examples:

  • "All"
  • "Apparel"
  • "Appliances"
  • "Automotive"
  • "Baby"
  • "Beauty"
  • "Blended"
  • "Books"
  • "Classical"
  • "CreditCards"
  • "DVD"
  • "Electronics"
  • "ForeignBooks"
  • "GiftCards"
  • "Grocery"
  • "HealthPersonalCare"
  • "Hobbies"
  • "HomeImprovement"
  • "Industrial"
  • "Jewelry"
  • "KindleStore"
  • "Kitchen"
  • "Marketplace"
  • "MP3Downloads"
  • "Music"
  • "MusicalInstruments"
  • "OfficeProducts"
  • "PCHardware"
  • "PetSupplies"
  • "Shoes"
  • "Software"
  • "SportingGoods"
  • "Toys"
  • "Video"
  • "VideoDownload"
  • "VideoGames"
  • "Watches"

See http://docs.aws.amazon.com/AWSECommerceService/latest/DG/localevalues.html for more details.

rapa's People

Contributors

nek023 avatar r7kamura avatar ryosuke-endo avatar tetsuya avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.