=begin Marketcheck Cars API Access the New, Used and Certified cars inventories for all Car Dealers in US.
The data is sourced from online listings by over 40,000 Car dealers in US. At any time, there are about 5.2M searchable listings (about 1.8M unique VINs) for Used & Certified cars and about 5M (about 2.3M unique VINs) New Car listings from all over US. We use this API at the back for our website www.marketcheck.com and our Android and iOS mobile apps too.
Few useful links :
OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git =end require "uri" module SwaggerClient class VINDecoderApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # VIN Decoder # Get the basic information on specifications for a car identified by a valid VIN # @param api_key The API Authentication Key. Mandatory with all API calls. # @param vin VIN to decode # @param [Hash] opts the optional parameters # @return [Build] def decode(api_key, vin, opts = {}) data, status_code, headers = decode_with_http_info(api_key, vin, opts) return data end # VIN Decoder # Get the basic information on specifications for a car identified by a valid VIN # @param api_key The API Authentication Key. Mandatory with all API calls. # @param vin VIN to decode # @param [Hash] opts the optional parameters # @return [Array<(Build, Fixnum, Hash)>] Build data, response status code and response headers def decode_with_http_info(api_key, vin, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: VINDecoderApi#decode ..." end # verify the required parameter 'api_key' is set fail "Missing the required parameter 'api_key' when calling decode" if api_key.nil? # verify the required parameter 'vin' is set fail "Missing the required parameter 'vin' when calling decode" if vin.nil? # resource path local_var_path = "/vin/{vin}/specs".sub('{format}','json').sub('{' + 'vin' + '}', vin.to_s) # query parameters query_params = {} query_params[:'api_key'] = api_key # 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 => 'Build') if @api_client.config.debugging @api_client.config.logger.debug "API called: VINDecoderApi#decode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end