Class: NPR::Product
Overview
Product represents any products associated with a Story. A lot of stories have books attached as products. Product isn’t officially documented in the NPR API documentation, thus the comments here are based on observations. Products have the following attributes:
-
id- the unique ID for the Product within NPR -
type- what kind of Product this is, i.e., book, etc -
author- a book’s author -
upc- the UPC code for a Product -
publisher- the publisher of a book -
year- the year the book or Product was introduced/published -
link- a hash linking to the product for sale on a vendor’s website. Uselink[:uri]
to access the URI for the product and <tt>link[:vendor]</tt> to access the vendor.
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#id ⇒ Object
Returns the value of attribute id.
-
#link ⇒ Object
Returns the value of attribute link.
-
#publisher ⇒ Object
Returns the value of attribute publisher.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#upc ⇒ Object
Returns the value of attribute upc.
-
#year ⇒ Object
Returns the value of attribute year.
Method Summary
Methods inherited from Content
Constructor Details
This class inherits a constructor from NPR::Content
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
17 18 19 |
# File 'lib/rubynpr/product.rb', line 17 def end |
#id ⇒ Object
Returns the value of attribute id.
17 18 19 |
# File 'lib/rubynpr/product.rb', line 17 def id @id end |
#link ⇒ Object
Returns the value of attribute link.
17 18 19 |
# File 'lib/rubynpr/product.rb', line 17 def link @link end |
#publisher ⇒ Object
Returns the value of attribute publisher.
17 18 19 |
# File 'lib/rubynpr/product.rb', line 17 def publisher @publisher end |
#title ⇒ Object
Returns the value of attribute title.
17 18 19 |
# File 'lib/rubynpr/product.rb', line 17 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
17 18 19 |
# File 'lib/rubynpr/product.rb', line 17 def type @type end |
#upc ⇒ Object
Returns the value of attribute upc.
17 18 19 |
# File 'lib/rubynpr/product.rb', line 17 def upc @upc end |
#year ⇒ Object
Returns the value of attribute year.
17 18 19 |
# File 'lib/rubynpr/product.rb', line 17 def year @year end |