Project

sqoot

0.0
No commit activity in last 3 years
No release in over 3 years
Wrapper for Sqoot API. Using FaradayMiddleware
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3.0
~> 0.6.0
~> 1.6.5
~> 0.9.2.2
~> 2.8.0
~> 2.11.3
~> 0.6.4
~> 2.0.0.rc1

Runtime

~> 0.7.5
~> 1.2.0
 Project Readme

Sqoot Build Status

Wrapper for Sqoot API. Highly inspired by Gowalla gem. Built using Faraday and Faraday Middleware.

To get the list of available parameters kindly check out API

Installation

Add this line to your application's Gemfile:

gem 'sqoot'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sqoot

Usage

Sqoot.configure do |config|
  config.affiliate_token = "YOUR AFFILIATE TOKEN"
  config.authentication_token = "YOUR AUTHENTICATION TOKEN"
end

sqoot = Sqoot::Client.new

# http://api.sqoot.com/v1/offers?affiliate_token=yadayada
sqoot.offers
#=> returns a list of offers

# http://api.sqoot.com/v1/offers?affiliate_token=yadayada&location=Chicago
sqoot.offers(:location => 'Chicago')

# http://api.sqoot.com/v1/offers?affiliate_token=yadayada&location=Chicago&per_page=10
sqoot.offers(:location => 'Chicago', :per_page => 10)

# http://api.sqoot.com/v1/offers?affiliate_token=yadayada&categories=health-beauty&location=&page=2
sqoot.offers(:location => 'Chicago', :per_page => 10, :categories => 'health-beauty', :page => 2)

# http://api.sqoot.com/v1/offers?affiliate_token=yadayada&order=commission&per_page=250&price_at_least=10
sqoot.offers(:price_at_least => 10, :order => commission)

# http://api.sqoot.com/v1/providers?affiliate_token=yadayada
sqoot.providers

# http://api.sqoot.com/v1/commissions?authentication_token=tokenawesome
sqoot.commissions
# => returns current month commissions

sqoot.commissions(:to => '2012-01-01', :from => '2012-01-20')
# => returns commissions using date_range :to & :from

# http://api.sqoot.com/v1/clicks?authentication_token=tokenawesome
sqoot.clicks
# => returns real-time clicks from the event request limit of 1000

sqoot.clicks(:to => '2012-01-01', :from => '2012-01-20')
# => returns clicks using date_range :to & :from

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request