Class: Google::Books::VolumeInfo
- Inherits:
-
Object
- Object
- Google::Books::VolumeInfo
- Defined in:
- lib/bookle/google_books_volume_info.rb
Instance Attribute Summary collapse
-
#authors ⇒ Object
readonly
Returns the value of attribute authors.
-
#average_rating ⇒ Object
readonly
Returns the value of attribute average_rating.
-
#canonical_volume_link ⇒ Object
readonly
Returns the value of attribute canonical_volume_link.
-
#categories ⇒ Object
readonly
Returns the value of attribute categories.
-
#content_version ⇒ Object
readonly
Returns the value of attribute content_version.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#image_links ⇒ Object
readonly
Returns the value of attribute image_links.
-
#industry_identifiers ⇒ Object
readonly
Returns the value of attribute industry_identifiers.
-
#info_link ⇒ Object
readonly
Returns the value of attribute info_link.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#page_count ⇒ Object
readonly
Returns the value of attribute page_count.
-
#preview_link ⇒ Object
readonly
Returns the value of attribute preview_link.
-
#print_type ⇒ Object
readonly
Returns the value of attribute print_type.
-
#published_date ⇒ Object
readonly
Returns the value of attribute published_date.
-
#publisher ⇒ Object
readonly
Returns the value of attribute publisher.
-
#ratings_count ⇒ Object
readonly
Returns the value of attribute ratings_count.
-
#subtitle ⇒ Object
readonly
Returns the value of attribute subtitle.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(volume_info) ⇒ VolumeInfo
constructor
A new instance of VolumeInfo.
Constructor Details
#initialize(volume_info) ⇒ VolumeInfo
Returns a new instance of VolumeInfo.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/bookle/google_books_volume_info.rb', line 11 def initialize(volume_info) volume_info = {} unless volume_info @title = volume_info["title"] @subtitle = volume_info["subtitle"] @authors = volume_info["authors"] @publisher = volume_info["publisher"] @published_date = volume_info["published_date"] @description = volume_info["description"] @industry_identifiers = volume_info["industryIdentifiers"].collect do |i| Google::Books::IndustryIdentifier.new(i) end if volume_info["industryIdentifiers"] @page_count = volume_info["pageCount"] @print_type = volume_info["printType"] @categories = volume_info["categories"] @average_rating = volume_info["averageRating"] @ratings_count = volume_info["ratingsCount"] @content_version = volume_info["contentVersion"] @image_links = Google::Books::ImageLinks.new(volume_info["imageLinks"]) @language = volume_info["language"] @preview_link = volume_info["previewLink"] @info_link = volume_info["infoLink"] @canonical_volume_link = volume_info["canonicalVolumeLink"] end |
Instance Attribute Details
#authors ⇒ Object (readonly)
Returns the value of attribute authors.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def @authors end |
#average_rating ⇒ Object (readonly)
Returns the value of attribute average_rating.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def @average_rating end |
#canonical_volume_link ⇒ Object (readonly)
Returns the value of attribute canonical_volume_link.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def canonical_volume_link @canonical_volume_link end |
#categories ⇒ Object (readonly)
Returns the value of attribute categories.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def categories @categories end |
#content_version ⇒ Object (readonly)
Returns the value of attribute content_version.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def content_version @content_version end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def description @description end |
#image_links ⇒ Object (readonly)
Returns the value of attribute image_links.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def image_links @image_links end |
#industry_identifiers ⇒ Object (readonly)
Returns the value of attribute industry_identifiers.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def industry_identifiers @industry_identifiers end |
#info_link ⇒ Object (readonly)
Returns the value of attribute info_link.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def info_link @info_link end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def language @language end |
#page_count ⇒ Object (readonly)
Returns the value of attribute page_count.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def page_count @page_count end |
#preview_link ⇒ Object (readonly)
Returns the value of attribute preview_link.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def preview_link @preview_link end |
#print_type ⇒ Object (readonly)
Returns the value of attribute print_type.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def print_type @print_type end |
#published_date ⇒ Object (readonly)
Returns the value of attribute published_date.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def published_date @published_date end |
#publisher ⇒ Object (readonly)
Returns the value of attribute publisher.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def publisher @publisher end |
#ratings_count ⇒ Object (readonly)
Returns the value of attribute ratings_count.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def @ratings_count end |
#subtitle ⇒ Object (readonly)
Returns the value of attribute subtitle.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def subtitle @subtitle end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
7 8 9 |
# File 'lib/bookle/google_books_volume_info.rb', line 7 def title @title end |