Class: RemoteBook::BarnesAndNoble
- Defined in:
- lib/remote_book/barnes_and_noble.rb
Constant Summary collapse
- ISBN_SEARCH_BASE_URI =
"http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?ISBSRC=Y&ISBN="
- LINK_SHARE_DEEP_LINK_BASE =
"http://getdeeplink.linksynergy.com/createcustomlink.shtml"
- BN_LINK_SHARE_MID =
"36889"
Instance Attribute Summary collapse
-
#affiliate_link ⇒ Object
Returns the value of attribute affiliate_link.
-
#raw_link ⇒ Object
Returns the value of attribute raw_link.
Attributes inherited from Base
Class Method Summary collapse
Methods inherited from Base
associate_keys, associate_keys=, #author, find_by_isbn, setup
Instance Attribute Details
#affiliate_link ⇒ Object
Returns the value of attribute affiliate_link.
10 11 12 |
# File 'lib/remote_book/barnes_and_noble.rb', line 10 def affiliate_link @affiliate_link end |
#raw_link ⇒ Object
Returns the value of attribute raw_link.
10 11 12 |
# File 'lib/remote_book/barnes_and_noble.rb', line 10 def raw_link @raw_link end |
Class Method Details
.find(options) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/remote_book/barnes_and_noble.rb', line 12 def self.find() b = new if [:isbn] bn_page = ([:isbn]) return nil unless bn_page b.raw_link = bn_page b.affiliate_link = link_share_deep_link_for(bn_page) b.link = b.affiliate_link.nil? ? b.raw_link : b.affiliate_link end b end |