Skip to content

sfaxon/remote_book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

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.

About

Pull book affiliate links and images from Amazon, Barns & Noble

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages