140Proof API Wrapper
A Ruby wrapper around the 140Proof API. Documentation can be found here - developers.140proof.com/docs
It currently only supports JSON.
Install
gem sources -a http://gemcutter.org
sudo gem install one40_proof
How To Use
Testing ad placement while in development
require 'rubygems'
require 'one40_proof'
ad = One40Proof::Test.new
# The Ad
ad.image_url
ad.
ad.text
# User
ad.user.screen_name
ad.user.user_id
ad.user.profile_image_url
ad.user.name
# Action URLS
ad.action_urls.click_url
ad.action_urls.favorite_url # Or ad.action_urls.favourite_url for the English
ad.action_urls.impression_url
ad.action_urls.friendship_url
ad.action_urls.reply_url
ad.action_urls.retweet_url
To get an ad for a specific user
require 'rubygems'
require 'one40_proof'
ad = One40Proof::UserAd.new(:user_id => 'reddavis', :publisher_id => 'your publisher id')
To get an ad for a specific query
require 'rubygems'
require 'one40_proof'
ad = One40Proof::Search.new(:user_id => 'reddavis', :publisher_id => 'your publisher id', :q => 'magic hats')
Copyright
Copyright © 2010 Red Davis. See LICENSE for details.