Class: Google::Apis::BooksV1::Review

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/books_v1/classes.rb,
generated/google/apis/books_v1/representations.rb,
generated/google/apis/books_v1/representations.rb

Defined Under Namespace

Classes: Author, Source

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Review

Returns a new instance of Review.



2497
2498
2499
# File 'generated/google/apis/books_v1/classes.rb', line 2497

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#authorGoogle::Apis::BooksV1::Review::Author

Author of this review. Corresponds to the JSON property author



2447
2448
2449
# File 'generated/google/apis/books_v1/classes.rb', line 2447

def author
  @author
end

#contentString

Review text. Corresponds to the JSON property content

Returns:

  • (String)


2452
2453
2454
# File 'generated/google/apis/books_v1/classes.rb', line 2452

def content
  @content
end

#dateString

Date of this review. Corresponds to the JSON property date

Returns:

  • (String)


2457
2458
2459
# File 'generated/google/apis/books_v1/classes.rb', line 2457

def date
  @date
end

#full_text_urlString

URL for the full review text, for reviews gathered from the web. Corresponds to the JSON property fullTextUrl

Returns:

  • (String)


2462
2463
2464
# File 'generated/google/apis/books_v1/classes.rb', line 2462

def full_text_url
  @full_text_url
end

#kindString

Resource type for a review. Corresponds to the JSON property kind

Returns:

  • (String)


2467
2468
2469
# File 'generated/google/apis/books_v1/classes.rb', line 2467

def kind
  @kind
end

#ratingString

Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, FIVE or NOT_RATED. Corresponds to the JSON property rating

Returns:

  • (String)


2473
2474
2475
# File 'generated/google/apis/books_v1/classes.rb', line 2473

def rating
  @rating
end

#sourceGoogle::Apis::BooksV1::Review::Source

Information regarding the source of this review, when the review is not from a Google Books user. Corresponds to the JSON property source



2479
2480
2481
# File 'generated/google/apis/books_v1/classes.rb', line 2479

def source
  @source
end

#titleString

Title for this review. Corresponds to the JSON property title

Returns:

  • (String)


2484
2485
2486
# File 'generated/google/apis/books_v1/classes.rb', line 2484

def title
  @title
end

#typeString

Source type for this review. Possible values are EDITORIAL, WEB_USER or GOOGLE_USER. Corresponds to the JSON property type

Returns:

  • (String)


2490
2491
2492
# File 'generated/google/apis/books_v1/classes.rb', line 2490

def type
  @type
end

#volume_idString

Volume that this review is for. Corresponds to the JSON property volumeId

Returns:

  • (String)


2495
2496
2497
# File 'generated/google/apis/books_v1/classes.rb', line 2495

def volume_id
  @volume_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
# File 'generated/google/apis/books_v1/classes.rb', line 2502

def update!(**args)
  @author = args[:author] if args.key?(:author)
  @content = args[:content] if args.key?(:content)
  @date = args[:date] if args.key?(:date)
  @full_text_url = args[:full_text_url] if args.key?(:full_text_url)
  @kind = args[:kind] if args.key?(:kind)
  @rating = args[:rating] if args.key?(:rating)
  @source = args[:source] if args.key?(:source)
  @title = args[:title] if args.key?(:title)
  @type = args[:type] if args.key?(:type)
  @volume_id = args[:volume_id] if args.key?(:volume_id)
end