0.01
No commit activity in last 3 years
No release in over 3 years
A Buscape API wrapper
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.8.3
 Project Readme

Buscape API¶ ↑

Installation¶ ↑

gem install buscape_api

Usage¶ ↑

First require the gem:

require 'buscape_api'

Then instantiate the Buscape class

buscape = Buscape.new(:app_id => 'your_app_key')

The Buscape class takes also two optional parameters which are :sandbox(should be true) and :country_code(check about it’s usage at developer.buscape.com/api/)

An example using all the parameters is:

buscape = Buscape.new(:app_id => 'your_app_key', :country_code => 'BR', :sandbox => true)

Now you have the following methods to be used with your object:

  • categories

  • products

  • offers

  • top_products

  • user_ratings

  • product_details

  • seller_details

After that, use the where method passing the parameters(follow developer.buscape.com/api/ parameters usage).

Example:¶ ↑

require 'buscape_api'

buscape = Buscape.new(:app_id => '12345', :sandbox => true)

buscape.products.where(:categoryId => 77) # Returns all products of category 77 in array/hash style.

buscape.top_products.where(:keyword => 'Celular') # Returns all top products that is a Celular

Contributing¶ ↑

Feel free to submit any ideas, issues or pull requests. If you have the time, write some tests/docs(should be simple) for it.

Contributors¶ ↑

None yet.