Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

/fullcontact.rb Secret

Created December 20, 2015 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/74d824de176520593b91 to your computer and use it in GitHub Desktop.
Save anonymous/74d824de176520593b91 to your computer and use it in GitHub Desktop.
require 'open-uri'
require 'json'
emails = IO.readlines("emails-group-1")
emails.each do |line|
line.chomp!
end
# print emails
payload = emails.map { |e| JSON.parse open("http://api.fullcontact.com/v2/person.json?email=#{e}&apiKey=XXXXXX").read }.to_json
File.write( 'stats.json', payload)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment