supermarket_api is a Ruby gem that makes it easy to communicate with the Supermarket API.
Add this line to your application's Gemfile:
gem 'supermarket_api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install supermarket_api
After including the gem in your project, instantiate a new SupermarketApi::Client
instance.
client = SupermarketApi::Client.new('YOUR_API_KEY')
All API calls happen through your Client
instance. Each call counts towards the use of any rate
limiting or costs associated with the service.
#product_search_by_id
- Given an item ID, returns aSupermarketApi::Product
object.#product_search_by_name
- Given an item name, returns an array ofSupermarketApi::Product
objects.#product_search
- Given an item name and store ID, returns an array ofSupermarketApi::Product
objects.#commercial_product_search_by_id
- Given an item ID, returns aSupermarketApi::Product
object (including price information).#commercial_product_search_by_name
- Given an item name, returns an array ofSupermarketApi::Product
objects (including price information).#commercial_product_search
- Given an item name and store ID, returns an array ofSupermarketApi::Product
objects (including price information).
#stores_by_name
- Given a name, returns an array ofSupermarketApi::Store
objects.#stores_by_city_state
- Given a city and state code, returns an array ofSupermarketApi::Store
objects.#stores_by_zip
- Given a zip code, returns an array ofSupermarketApi::Store
objects.
TODO
TODO
TODO
- Fork it ( https://github.com/[my-github-username]/supermarket_api/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Ensure all new and existing tests pass (
bundle exec rake spec
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request