marketcheck_ruby_client
The Ruby gem for the Marketcheck Cars API
Access 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 :
- A quick view of the API and the use cases is depicated here
- The Postman collection with various usages of the API is shared here https://www.getpostman.com/collections/2752684ff636cdd7bac2
- [Coming soon] API Key : Request your API Key here
- [Coming soon] Benchmarks : See the API benchmarks here
This SDK is automatically generated by the Swagger Codegen project:
- API verion: 1.0.4
- Package version: 1.0.0
- Build date: 2016-03-22T18:25:59.270Z
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build marketcheck_ruby_client.gemspec
Then either install the gem locally:
gem install ./marketcheck_ruby_client-1.0.4.gem
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'marketcheck_ruby_client', '~> 1.0.4'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO, then add the following in the Gemfile:
gem 'marketcheck_ruby_client', :git => 'https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'marketcheck_ruby_client'
api_instance = SwaggerClient::DealerApi.new
api_key = "api_key_example" # String | The API Authentication Key. Mandatory with all API calls.
latitude = 1.2 # Float | Latitude component of location
longitude = 1.2 # Float | Longitude component of location
radius = 56 # Integer | Radius around the search location
type = "type_example" # String | Dealer inventory type. Allowed values are - new / used / certified
opts = {
rows: 3.4, # Float | Number of results to return. Default is 10. Max is 50
start: 3.4 # Float | Offset for the search results. Default is 1.
}
begin
#Find car dealers around
result = api_instance.dealer_search(api_key, latitude, longitude, radius, type, opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealerApi->dealer_search: #{e}"
end
Documentation for API Endpoints
All URIs are relative to http://api.marketcheck.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
SwaggerClient::DealerApi | dealer_search | GET /dealers | Find car dealers around |
SwaggerClient::DealerApi | get_dealer | GET /dealer/id | Dealer by id |
SwaggerClient::DealerApi | get_dealer_active_inventory | GET /dealer/dealer_id/active/inventory | Dealer inventory |
SwaggerClient::DealerApi | get_dealer_historical_inventory | GET /dealer/dealer_id/historical/inventory | Dealer's historical inventory |
SwaggerClient::FacetsApi | get_facets | GET /facets | Facets |
SwaggerClient::GraphsApi | get_price_miles_plot_data | GET /plots | Price, Miles plots data for given criteria |
SwaggerClient::HistoryApi | history | GET /history/vin | Get a cars online listing history |
SwaggerClient::InventoryApi | get_dealer_active_inventory | GET /dealer/dealer_id/active/inventory | Dealer inventory |
SwaggerClient::InventoryApi | get_dealer_historical_inventory | GET /dealer/dealer_id/historical/inventory | Dealer's historical inventory |
SwaggerClient::ListingsApi | get_listing | GET /listing/id | Listing by id |
SwaggerClient::ListingsApi | get_listing_extra | GET /listing/id/extra | Long text Listings attributes for Listing with the given id |
SwaggerClient::ListingsApi | get_listing_media | GET /listing/id/media | Listing media by id |
SwaggerClient::ListingsApi | get_listing_vdp | GET /listing/id/vdp | Get listing HTML |
SwaggerClient::ListingsApi | search | GET /search | Gets active car listings for the given search criteria |
SwaggerClient::MarketAveragesApi | get_averages | GET /averages | Get Averages for YMM |
SwaggerClient::MarketTrendsApi | get_trends | GET /trends | Get Trends for criteria |
SwaggerClient::VINDecoderApi | decode | GET /vin/vin/specs | VIN Decoder |
Documentation for Models
- SwaggerClient::Averages
- SwaggerClient::BaseListing
- SwaggerClient::Build
- SwaggerClient::Dealer
- SwaggerClient::Error
- SwaggerClient::FacetItem
- SwaggerClient::HistoricalListing
- SwaggerClient::Listing
- SwaggerClient::ListingDebugAttributes
- SwaggerClient::ListingExtraAttributes
- SwaggerClient::ListingMedia
- SwaggerClient::ListingVDP
- SwaggerClient::Location
- SwaggerClient::MakeModel
- SwaggerClient::PlotPoint
- SwaggerClient::SearchResponse
- SwaggerClient::TrendPoint
Documentation for Authorization
All endpoints do not require authorization.