Class: NPR::RelatedLink
Overview
RelatedLink represents any of the links that are included with an NPR story linking to related NPR content. A RelatedLink has its respective caption and two URIs associated with it: one which returns HTML and one which is the API URI for a story.
-
caption
- caption for a related link -
uri
- a hash containing URIs to access both the HTML and API representations of a related story. Use options:html
or:api
.
Example
@related_link = some_story.related_links[0].uri[:api]
Instance Attribute Summary collapse
-
#caption ⇒ Object
Returns the value of attribute caption.
-
#uri ⇒ Object
Returns the value of attribute uri.
Method Summary
Methods inherited from Content
Constructor Details
This class inherits a constructor from NPR::Content
Instance Attribute Details
#caption ⇒ Object
Returns the value of attribute caption.
14 15 16 |
# File 'lib/rubynpr/related_link.rb', line 14 def @caption end |
#uri ⇒ Object
Returns the value of attribute uri.
14 15 16 |
# File 'lib/rubynpr/related_link.rb', line 14 def uri @uri end |