Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Pull book affiliate links and images from Amazon, Barns & Noble
Ruby
tag: v0.1.4

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
tasks
.gitignore
Gemfile
README.rdoc
Rakefile
VERSION
remote_book.gemspec

README.rdoc

RemoteBook

RemoteBook is a gem for creating affiliate links to Amazon & B&N for books.

Installation

It's a gem. Either run `gem install remote_book` at the command line, or add `gem 'remote_book'` to your Gemfile.

Usage

Get your affiliate digits:

https://affiliate-program.amazon.com/
http://affiliates.barnesandnoble.com/ - sign up with LinkShare, wonder why Amazon is more popular

for rails, add something like this to an initializer

RemoteBook::Amazon.associate_keys = {:associates_id => "me", 
                                     :key_id        => "digits",
                                     :secret_key    => "secret_digits"}

RemoteBook::BarnesAndNoble.associate_keys = {:web_service_token => "token"}
To get the token, login to LinkShare, Links => Web Services (something like: http://cli.linksynergy.com/cli/publisher/links/webServices.php)

Right now it just searches by ISBN, so:

a = RemoteBook::Amazon.find_by_isbn("somedigits")
a.large_image
a.medium_image
a.small_image
a.link
a.author
a.title

b = RemoteBook::BarnesAndNoble.find_by_isbn("digits")
b.link

Barnes And Noble's LinkShare api isn't really much of an API, so all the BN class returns is a link. The Barnes And Noble API is very slow, everything returned from these classes should be cached on your end. You have been warned.

Something went wrong with that request. Please try again.