lib/vindetta/api.rb in vindetta-0.17.1 vs lib/vindetta/api.rb in vindetta-0.19.0
- old
+ new
@@ -1,15 +1,10 @@
require "net/http"
require "json"
module Vindetta
class Api
- def self.generate
- Net::HTTP.get("randomvin.com", "/getvin.php")
-
- end
-
- def self.get(vin)
+ def self.decode(vin)
uri = URI("https://vpic.nhtsa.dot.gov/api/vehicles/decodevin/#{vin}?format=json")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true