Module: HomeAway::API::Domain::ListingReviews

Included in:
Client
Defined in:
lib/homeaway/api/domain/listing_reviews.rb

Instance Method Summary collapse

Instance Method Details

#listing_reviews(listing_id, unit_id, opts = {}) ⇒ HomeAway::API::Paginator

Returns a page of reviews for the specified listing and unit

analogous to calling a GET on API url /public/listingReviews

Parameters:

  • listing_id (String)

    The listing id to be booked as retrieved from the search operation

  • unit_id (Integer)

    The id of the unit being booked for the stay

  • opts (Hash) (defaults to: {})

    a customizable set of options

Options Hash (opts):

  • :page (Integer)

    The page number to fetch

  • :page_size (Integer)

    The number of reviews to return per page

Returns:



30
31
32
33
34
35
36
37
38
39
# File 'lib/homeaway/api/domain/listing_reviews.rb', line 30

def listing_reviews(listing_id, unit_id, opts={})
  params = {
      'listingId' => listing_id.to_s,
      'unitId' => unit_id.to_s,
      'page' => 1,
      'pageSize' => @configuration.page_size
  }.merge(HomeAway::API::Util::Validators.query_keys(opts))
  hashie = get '/public/listingReviews', params
  HomeAway::API::Paginator.new(self, hashie, @configuration.auto_pagination)
end