Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ruby Wrapper for Sqoot

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Guardfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 sqoot.gemspec
README.md

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
Something went wrong with that request. Please try again.