Class: NPR::Item

Inherits:
Content show all
Defined in:
lib/rubynpr/item.rb

Overview

Topics accessed via the API are packaged as items with the following attributes:

  • id - the topic ID

  • number - item number

  • type - what kind of content the topic represents, i.e. biography, a column, etc.

  • slug - short item descriptor

  • additional_info - extra info/summary about the target

  • title - the name of the topic

Instance Attribute Summary collapse

Method Summary

Methods inherited from Content

#initialize

Constructor Details

This class inherits a constructor from NPR::Content

Instance Attribute Details

#additional_infoObject Also known as: info

Returns the value of attribute additional_info.



12
13
14
# File 'lib/rubynpr/item.rb', line 12

def additional_info
  @additional_info
end

#idObject

Returns the value of attribute id.



12
13
14
# File 'lib/rubynpr/item.rb', line 12

def id
  @id
end

#numberObject

Returns the value of attribute number.



12
13
14
# File 'lib/rubynpr/item.rb', line 12

def number
  @number
end

#slugObject

Returns the value of attribute slug.



12
13
14
# File 'lib/rubynpr/item.rb', line 12

def slug
  @slug
end

#titleObject

Returns the value of attribute title.



12
13
14
# File 'lib/rubynpr/item.rb', line 12

def title
  @title
end

#typeObject

Returns the value of attribute type.



12
13
14
# File 'lib/rubynpr/item.rb', line 12

def type
  @type
end