0.0
No commit activity in last 3 years
No release in over 3 years
A caching client for vin decoding web services. The caching allows the consumer to avoid the cost of secondary lookups.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

VinExploder

A ruby library for retrieving and caching Vehicle Identification Number (VIN) lookups.

How to install

Bundler

  gem vin_exploder

Rubygems

  gem install vin_exploder

How to use

Using the vin exploder will require a decoding service adapter. Thankfully one is available in the Vinquery gem

  require 'vin_exploder'
  # require the Vinquery.com adapter
  require 'vinquery/vin_exploder/adapter'
  
  # tell vin_exploder to use the Vinquery.com adapter and pass it's required config
  VinExploder.config.adapter :vinquery, {:url => 'VINQUERY_URL', :access_code => 'ACCESS_CODE', :report_type => 'REPORT_TYPE'}
  # request the decoded VIN data
  vin_explosion = VinExploder.get('1FTWX31R19EB18840')
  
  vin_explosion.valid? # true
  vin_explosion.make   # Ford

Rails use

Create an initializer for the config

  require 'vin_exploder'
  require 'vinquery/vin_exploder/adapter'
  
  VinExploder.config.adapter :vinquery, {:url => 'VINQUERY_URL', :access_code => 'ACCESS_CODE', :report_type => 'REPORT_TYPE'}

Optional Cache

To save on the cost of looking up a VIN multiple times setup a cache

  require 'vin_exploder'
  # require the Sequel based cache store
  require 'vin_exploder/cache/sequel_cache_store'
  # require the Vinquery.com adapter
  require 'vinquery/vin_exploder/adapter'
  
  # tell vin_exploder to use the Sequel based cache store adapter and pass in the connection config
  VinExploder.config.cache_store :sequel_cache_store, "mysql://localhost:3896/vin_cache"
  
  # tell vin_exploder to use the Vinquery.com adapter and pass it's required config
  VinExploder.config.adapter :vinquery, {:url => 'VINQUERY_URL', :access_code => 'ACCESS_CODE', :report_type => 'REPORT_TYPE'}
  
  # request the decoded VIN data
  vin_explosion = VinExploder.get('1FTWX31R19EB18840')
  
  vin_explosion.valid? #=> true
  vin_explosion.make   #=> Ford
  
  # decoded VIN data is retrieved from cache
  vin_explosion2 = VinExploder.get('1FTWX31R19EB18840')
  vin_explosion2.make   #=> Ford