Method: Libring::API#get_clv
- Defined in:
- lib/libring/api.rb
#get_clv(contact_code) ⇒ Object
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/libring/api.rb', line 133 def get_clv(contact_code) require "net/https" require "uri" require "json" uri = URI.parse("https://api.libring.com/v2/clv/get/" + contact_code.to_s) https = Net::HTTP.new(uri.host, uri.port) https.use_ssl = true req = Net::HTTP::Get.new(uri.request_uri, initheader = {'Content-Type' =>'application/json', 'Authorization' => "Token #{@token}"}) resp = https.request(req) resp.body end |