0.0
No commit activity in last 3 years
No release in over 3 years
This gem provides a simple utility class to pull data from snapdeal.com using Snapdeal's affiliate APIs
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0
>= 0

Runtime

= 1.8.1
= 1.6.6.2
 Project Readme

SnapdealApi

Utility class to pull data from snapdeal.com using Snapdeal's affiliate APIs http://affiliate.snapdeal.com/affiliate/api/product/feeds/.

Inspired by https://github.com/deepakhb2/flipkart_api

Installation

Add this line to your application's Gemfile:

gem 'snapdeal_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install snapdeal_api

Usage

require 'snapdeal_api'

sd_api = SnapdealApi.new(Snapdeal-Affiliate-Id, Snapdeal-Token-Id, format) #format : json/xml

categories_string = sd_api.get_categories(optional format) #format : json/xml is optional, if not passed will use the one from new

categories = sd_api.get_parsed_categories

rest_url = sd_api.get_products_api(category_name) #Name is as present in the categories

products_string = sd_api.get_products_by_category(category_name) #Name is as present in categories. Returns upto first 500 products in the format specified while creating new object

products_string = sd_api.get_products(rest_url, optional format) #format : json/xml, if not passed will use the one from new

products_array = sd_api.get_all_products(rest_url) This method will fetch all the products in this category, in an array of JSON data. Warning: This implemenation is for reference, handle with care

License

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