Class: Repull::MarketsApi
- Inherits:
-
Object
- Object
- Repull::MarketsApi
- Defined in:
- lib/repull/api/markets_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_market(city, opts = {}) ⇒ MarketDetailResponse
Deep-dive on a single market Detailed market view for one city — price distribution, bedroom mix, property types, upcoming events, Wheelhouse demand, monthly benchmarks, customer health rollup, top comps (proximity-sorted, paginated), customer’s percentile position, capacity-mix gap, and a 6-month supply trend.
-
#get_market_calendar(city, opts = {}) ⇒ MarketCalendarResponse
Calendar-level market view Date-by-date market view for a city — market avg / min / max nightly rate, occupancy %, Wheelhouse demand, events touching the date, and (when ‘listingId` is supplied) an overlay of the customer’s own pricing + availability.
-
#get_market_calendar_with_http_info(city, opts = {}) ⇒ Array<(MarketCalendarResponse, Integer, Hash)>
Calendar-level market view Date-by-date market view for a city — market avg / min / max nightly rate, occupancy %, Wheelhouse demand, events touching the date, and (when `listingId` is supplied) an overlay of the customer's own pricing + availability.
-
#get_market_with_http_info(city, opts = {}) ⇒ Array<(MarketDetailResponse, Integer, Hash)>
Deep-dive on a single market Detailed market view for one city — price distribution, bedroom mix, property types, upcoming events, Wheelhouse demand, monthly benchmarks, customer health rollup, top comps (proximity-sorted, paginated), customer's percentile position, capacity-mix gap, and a 6-month supply trend.
-
#initialize(api_client = ApiClient.default) ⇒ MarketsApi
constructor
A new instance of MarketsApi.
-
#list_market_browse(opts = {}) ⇒ MarketBrowseResponse
Paginated discovery catalog Cursor-paginated, search-filterable catalog of every Atlas-tracked market the customer could expand into.
-
#list_market_browse_with_http_info(opts = {}) ⇒ Array<(MarketBrowseResponse, Integer, Hash)>
Paginated discovery catalog Cursor-paginated, search-filterable catalog of every Atlas-tracked market the customer could expand into.
-
#list_markets(opts = {}) ⇒ MarketsOverviewResponse
List markets the customer operates in Returns per-city KPIs across every market the authenticated customer has listings in (market share, ADR vs market, occupancy, ratings) plus a lightweight ‘browse` discovery summary (top-50 featured markets, country categories, total catalog size).
-
#list_markets_with_http_info(opts = {}) ⇒ Array<(MarketsOverviewResponse, Integer, Hash)>
List markets the customer operates in Returns per-city KPIs across every market the authenticated customer has listings in (market share, ADR vs market, occupancy, ratings) plus a lightweight `browse` discovery summary (top-50 featured markets, country categories, total catalog size).
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ MarketsApi
Returns a new instance of MarketsApi.
19 20 21 |
# File 'lib/repull/api/markets_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/repull/api/markets_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_market(city, opts = {}) ⇒ MarketDetailResponse
Deep-dive on a single market Detailed market view for one city — price distribution, bedroom mix, property types, upcoming events, Wheelhouse demand, monthly benchmarks, customer health rollup, top comps (proximity-sorted, paginated), customer’s percentile position, capacity-mix gap, and a 6-month supply trend.
28 29 30 31 |
# File 'lib/repull/api/markets_api.rb', line 28 def get_market(city, opts = {}) data, _status_code, _headers = get_market_with_http_info(city, opts) data end |
#get_market_calendar(city, opts = {}) ⇒ MarketCalendarResponse
Calendar-level market view Date-by-date market view for a city — market avg / min / max nightly rate, occupancy %, Wheelhouse demand, events touching the date, and (when ‘listingId` is supplied) an overlay of the customer’s own pricing + availability.
100 101 102 103 |
# File 'lib/repull/api/markets_api.rb', line 100 def get_market_calendar(city, opts = {}) data, _status_code, _headers = get_market_calendar_with_http_info(city, opts) data end |
#get_market_calendar_with_http_info(city, opts = {}) ⇒ Array<(MarketCalendarResponse, Integer, Hash)>
Calendar-level market view Date-by-date market view for a city — market avg / min / max nightly rate, occupancy %, Wheelhouse demand, events touching the date, and (when `listingId` is supplied) an overlay of the customer's own pricing + availability.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/repull/api/markets_api.rb', line 113 def get_market_calendar_with_http_info(city, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MarketsApi.get_market_calendar ...' end # verify the required parameter 'city' is set if @api_client.config.client_side_validation && city.nil? fail ArgumentError, "Missing the required parameter 'city' when calling MarketsApi.get_market_calendar" end # resource path local_var_path = '/v1/markets/{city}/calendar'.sub('{city}', CGI.escape(city.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'listingId'] = opts[:'listing_id'] if !opts[:'listing_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MarketCalendarResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MarketsApi.get_market_calendar", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MarketsApi#get_market_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_market_with_http_info(city, opts = {}) ⇒ Array<(MarketDetailResponse, Integer, Hash)>
Deep-dive on a single market Detailed market view for one city — price distribution, bedroom mix, property types, upcoming events, Wheelhouse demand, monthly benchmarks, customer health rollup, top comps (proximity-sorted, paginated), customer's percentile position, capacity-mix gap, and a 6-month supply trend.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/repull/api/markets_api.rb', line 39 def get_market_with_http_info(city, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MarketsApi.get_market ...' end # verify the required parameter 'city' is set if @api_client.config.client_side_validation && city.nil? fail ArgumentError, "Missing the required parameter 'city' when calling MarketsApi.get_market" end if @api_client.config.client_side_validation && !opts[:'comps_page'].nil? && opts[:'comps_page'] < 1 fail ArgumentError, 'invalid value for "opts[:"comps_page"]" when calling MarketsApi.get_market, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/markets/{city}'.sub('{city}', CGI.escape(city.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'compsPage'] = opts[:'comps_page'] if !opts[:'comps_page'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MarketDetailResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MarketsApi.get_market", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MarketsApi#get_market\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_market_browse(opts = {}) ⇒ MarketBrowseResponse
Paginated discovery catalog Cursor-paginated, search-filterable catalog of every Atlas-tracked market the customer could expand into. Backed by the precomputed ‘market_summaries` table (>=5 active comps per city). Supports fuzzy `q` substring search (trigram-indexed), `country` (ISO 3166-1 alpha-2) filter, and `sort` (`listings_desc` | `name_asc`). Use the `nextCursor` from `pagination` to walk pages — the cursor is an opaque base64 token; do not parse it. `pagination.total` is the count of markets matching the current `q`/`country`/`min_listings` filter (across all pages). Renamed from the upstream’s legacy ‘total_in_filter` so SDK consumers see the same `pagination.total` field as on every other list endpoint.
174 175 176 177 |
# File 'lib/repull/api/markets_api.rb', line 174 def list_market_browse(opts = {}) data, _status_code, _headers = list_market_browse_with_http_info(opts) data end |
#list_market_browse_with_http_info(opts = {}) ⇒ Array<(MarketBrowseResponse, Integer, Hash)>
Paginated discovery catalog Cursor-paginated, search-filterable catalog of every Atlas-tracked market the customer could expand into. Backed by the precomputed `market_summaries` table (>=5 active comps per city). Supports fuzzy `q` substring search (trigram-indexed), `country` (ISO 3166-1 alpha-2) filter, and `sort` (`listings_desc` | `name_asc`). Use the `nextCursor` from `pagination` to walk pages — the cursor is an opaque base64 token; do not parse it. `pagination.total` is the count of markets matching the current `q`/`country`/`min_listings` filter (across all pages). Renamed from the upstream's legacy `total_in_filter` so SDK consumers see the same `pagination.total` field as on every other list endpoint.
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/repull/api/markets_api.rb', line 189 def list_market_browse_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MarketsApi.list_market_browse ...' end if @api_client.config.client_side_validation && !opts[:'country'].nil? && opts[:'country'].to_s.length > 2 fail ArgumentError, 'invalid value for "opts[:"country"]" when calling MarketsApi.list_market_browse, the character length must be smaller than or equal to 2.' end if @api_client.config.client_side_validation && !opts[:'country'].nil? && opts[:'country'].to_s.length < 2 fail ArgumentError, 'invalid value for "opts[:"country"]" when calling MarketsApi.list_market_browse, the character length must be greater than or equal to 2.' end if @api_client.config.client_side_validation && !opts[:'min_listings'].nil? && opts[:'min_listings'] < 0 fail ArgumentError, 'invalid value for "opts[:"min_listings"]" when calling MarketsApi.list_market_browse, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MarketsApi.list_market_browse, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MarketsApi.list_market_browse, must be greater than or equal to 1.' end allowable_values = ["listings_desc", "name_asc"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/v1/markets/browse' # query parameters query_params = opts[:query_params] || {} query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil? query_params[:'min_listings'] = opts[:'min_listings'] if !opts[:'min_listings'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MarketBrowseResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MarketsApi.list_market_browse", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MarketsApi#list_market_browse\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_markets(opts = {}) ⇒ MarketsOverviewResponse
List markets the customer operates in Returns per-city KPIs across every market the authenticated customer has listings in (market share, ADR vs market, occupancy, ratings) plus a lightweight ‘browse` discovery summary (top-50 featured markets, country categories, total catalog size). For the full paginated discovery catalog with search, call `GET /v1/markets/browse`. Each `markets[]` entry is enriched with `subscribed` + `source` from the customer’s market subscriptions.
267 268 269 270 |
# File 'lib/repull/api/markets_api.rb', line 267 def list_markets(opts = {}) data, _status_code, _headers = list_markets_with_http_info(opts) data end |
#list_markets_with_http_info(opts = {}) ⇒ Array<(MarketsOverviewResponse, Integer, Hash)>
List markets the customer operates in Returns per-city KPIs across every market the authenticated customer has listings in (market share, ADR vs market, occupancy, ratings) plus a lightweight `browse` discovery summary (top-50 featured markets, country categories, total catalog size). For the full paginated discovery catalog with search, call `GET /v1/markets/browse`. Each `markets[]` entry is enriched with `subscribed` + `source` from the customer's market subscriptions.
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/repull/api/markets_api.rb', line 276 def list_markets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MarketsApi.list_markets ...' end # resource path local_var_path = '/v1/markets' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MarketsOverviewResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MarketsApi.list_markets", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MarketsApi#list_markets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |