0.01
No commit activity in last 3 years
No release in over 3 years
A simple ruby wrapper using httparty and Hashie to communicate with popshops API methods and work with data in nice ruby way.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0
>= 0

Runtime

~> 2.0
~> 0.8.0
 Project Readme

Popshops

A lightweight Ruby wrapper for communicating with the latest PopShops API (v3).

Installation

Add this line to your application's Gemfile:

gem 'popshops-api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install popshops-api

Usage

require 'popshops' as needed

Initialize the Popshops API

popshops = Popshops::Api.new('api_key_value', 'catalog_key_value' )

Options:

  • api_key: Required
  • catalog_key: Optional, but needed in many calls.
  • private_api_key: Optional, if your account supports it.
  • format: Optional. Can be :json or :xml. Defaults to :json

You can always switch popshops catalogs by reinitializing popshops, or utilizing the following method:

popshops.use_catalog('new_catalog_key')

You're now ready to start receiving data from Popshops. All of the PopShops API methods are available as:

  • find_products
  • find_coupons_and_deals
  • find_merchants
  • list_categories
  • list_merchant_types
  • list_deal_types
  • list_networks
  • list_countries
  • list_keywords

Product calls are used to get all information related to products, and the specific merchant offers for those products. One thing to note is that only offers will have affiliate links associated with them, the product itself will not have an affiliate URL.

To lookup all products in your catalog, call:

popshops.find_products

To search for products by keyword, call:

popshops.find_products(keyword: 'ipad')

More details to come for other sections.

Contributing

  1. Fork it ( http://github.com/beneggett/popshops-api/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Bitdeli Badge