Class: SwaggerClient::FacetsApi
- Inherits:
-
Object
- Object
- SwaggerClient::FacetsApi
- Defined in:
- lib/swagger_client/api/facets_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_facets(api_key, fields, opts = {}) ⇒ Array<FacetItem>
Facets [Merged with the /search API - Please check the ‘facets’ parameter to the Search API above] Get the facets for the given simple filter criteria (by given VIN’s basic specification, Or by Year, Make, Model, Trim criteria) and facet fields.
-
#get_facets_with_http_info(api_key, fields, opts = {}) ⇒ Array<(Array<FacetItem>, Fixnum, Hash)>
Facets [Merged with the /search API - Please check the 'facets' parameter to the Search API above] Get the facets for the given simple filter criteria (by given VIN's basic specification, Or by Year, Make, Model, Trim criteria) and facet fields.
-
#initialize(api_client = ApiClient.default) ⇒ FacetsApi
constructor
A new instance of FacetsApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/swagger_client/api/facets_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_facets(api_key, fields, opts = {}) ⇒ Array<FacetItem>
Facets
- Merged with the /search API - Please check the ‘facets’ parameter to the Search API above
-
Get the facets for the given simple filter criteria (by given VIN’s basic specification, Or by Year, Make, Model, Trim criteria) and facet fields
34 35 36 37 |
# File 'lib/swagger_client/api/facets_api.rb', line 34 def get_facets(api_key, fields, opts = {}) data, status_code, headers = get_facets_with_http_info(api_key, fields, opts) return data end |
#get_facets_with_http_info(api_key, fields, opts = {}) ⇒ Array<(Array<FacetItem>, Fixnum, Hash)>
Facets
- Merged with the /search API - Please check the 'facets' parameter to the Search API above
-
Get the facets for the given simple filter criteria (by given VIN's basic specification, Or by Year, Make, Model, Trim criteria) and facet fields
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 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/swagger_client/api/facets_api.rb', line 50 def get_facets_with_http_info(api_key, fields, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FacetsApi#get_facets ..." end # verify the required parameter 'api_key' is set fail "Missing the required parameter 'api_key' when calling get_facets" if api_key.nil? # verify the required parameter 'fields' is set fail "Missing the required parameter 'fields' when calling get_facets" if fields.nil? # resource path local_var_path = "/facets".sub('{format}','json') # query parameters query_params = {} query_params[:'api_key'] = api_key query_params[:'fields'] = fields query_params[:'vin'] = opts[:'vin'] if opts[:'vin'] query_params[:'year'] = opts[:'year'] if opts[:'year'] query_params[:'make'] = opts[:'make'] if opts[:'make'] query_params[:'model'] = opts[:'model'] if opts[:'model'] query_params[:'trim'] = opts[:'trim'] if opts[:'trim'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<FacetItem>') if @api_client.config.debugging @api_client.config.logger.debug "API called: FacetsApi#get_facets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |