Created
November 25, 2015 11:21
-
-
Save deependersingla/2d7cb893d3b7b4b464bd to your computer and use it in GitHub Desktop.
using truecaller using script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require "json" | |
number = ARGV[0] | |
unless defined? number | |
raise "number not given" | |
end | |
url = "https://search5.truecaller.com/v2/search?client_id=1&clientId=1&countryCode=in&locAddr=&myNumber=#{api_key}&pageId=&q=#{number}®isterId=94435922&type=4" | |
uri = URI(url) | |
data = Net::HTTP.get(uri) | |
data = JSON.parse(data) | |
puts "Name: #{data["data"][0]["name"]}" | |
puts "Gender: #{data["data"][0]["gender"]}" | |
puts "Address: #{data["data"][0]["addresses"][0]["address"]}" |
rs414057
commented
Feb 1, 2016
sir. api_key is undefined :(
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment