Module: HomeAway::API::Domain::MyListings

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

Instance Method Summary collapse

Instance Method Details

#my_listings(opts = {}) ⇒ HomeAway::API::Paginator

Note:

user must be logged in via 3 legged oauth to call this function without error

Returns a paginated summary of the owner’s listings.

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

Headers:

  • X-HomeAway-DisplayLocale: If a locale is not specified in a query param, it will be searched for in the X-HomeAway-DisplayLocale Header. If it is not supplied in either area the default locale of the user will be selected if it exists. Otherwise the Accept-Language Header will be used.

Parameters:

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

    a customizable set of options

Options Hash (opts):

  • :filter_product_type (String)

    Filter result by the subscription type of the listing: sub|ppb

  • :filter_status (String)

    Filter result by the enabled status of the listing: ENABLED|DISABLED

  • :address_contains (String)

    Filter results by a word contained in the address

  • :sort_by (String)

    Sort (format [field:ASC|DESC,field:ASC|DESC,…]) result by one or more of the following: status|updated|firstLive|subscriptionEnd|subscriptionStart|tierCode|productType

  • :page (Integer)

    The page of the listing set.

  • :page_size (Integer)

    The size of the page to return

Returns:



37
38
39
40
41
42
43
44
# File 'lib/homeaway/api/domain/my_listings.rb', line 37

def my_listings(opts={})
  params = {
      'page' => 1,
      'pageSize' => @configuration.page_size
  }.merge(HomeAway::API::Util::Validators.query_keys(opts))
  hashie = get '/public/myListings', params
  HomeAway::API::Paginator.new(self, hashie, @configuration.auto_pagination)
end