Skip to content

Instantly share code, notes, and snippets.

@jeffdonthemic
Created June 12, 2014 18:08
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 jeffdonthemic/48a60c01ddb93fccd374 to your computer and use it in GitHub Desktop.
Save jeffdonthemic/48a60c01ddb93fccd374 to your computer and use it in GitHub Desktop.
Reads handles from a CSV and calls topcoder API for more user details
require 'csv'
require 'httparty'
CSV.foreach('/Users/jeff/Desktop/names.csv', :headers => false) do |row|
response = HTTParty.get("http://api.topcoder.com/v2/users/#{row.first}")
puts "#{response['handle']},#{response['country']}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment