New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bestbuy_api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bestbuy_api

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Best Buy API

Build Status

A Ruby wrapper for the Best Buy developer API.

Installation

Add this line to your application's Gemfile:

gem 'bestbuy_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bestbuy_api

Getting Started

Sign-up for a developer API Key at https://developer.bestbuy.com/

API Documentation

Documentation for the Best Buy API is located at bestbuyapis.github.io.

Usage

require 'bestbuy_api'

BestbuyApi.config.api_key = 'YourBestbuyApiKey'

product = BestbuyApi::Product.select(:sku, :name, :sale_price, :url, :image)
                             .where(keyword: 'iPhone')
                             .limit(10).page(1)
product.items.each do |item|
  item['sku']
end

Find products

product = BestbuyApi::Product.select(:sku, :name, :sale_price, :url, :image)
product.items

Find categories

category = BestbuyApi::Category.select(:id, :name, :subcategory_id, :subcategory_name)
category.items

Find stores

store = BestbuyApi::Store.select(:id, :city, :state, :postal_code)
store.items

Selecting Specific Fields

BestbuyApi::Product.select(category_id: 'abcat500')

Conditions

BestbuyApi::Product.where(category_id: 'abcat500')

Limit and Offset

BestbuyApi::Product.limit(20).page(2)

Pagination

product = BestbuyApi::Product.where(category_id: 'abcat500')
product.pagination or product.url

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 28 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc