lib/vindetta/api.rb in vindetta-0.16.0 vs lib/vindetta/api.rb in vindetta-0.17.0

- old
+ new

@@ -1,9 +1,14 @@ require "net/http" require "json" module Vindetta class Api + def self.generate + Net::HTTP.get("randomvin.com", "/getvin.php") + + end + def self.get(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