Skip to content

Instantly share code, notes, and snippets.

@pbapi
Created February 14, 2012 04:16
Show Gist options
  • Save pbapi/1823511 to your computer and use it in GitHub Desktop.
Save pbapi/1823511 to your computer and use it in GitHub Desktop.
PeopleBrowsr API - Top Followers
require 'net/http'
# Proof (GET)
app_id = "[app_id]"
app_key = "[app_key]"
last = "yesterday"
count = "30"
source = "twitter"
term = "Pepsi"
number = "10"
url = 'http://api.peoplebrowsr.com/top-followers?'
url = url + 'app_id=' + app_id
url = url + '&app_key=' + app_key
url = url + '&last=' + last
url = url + '&count=' + count
url = url + '&term=' + term
url = url + '&number=' + number
url = url + '&source=' + source
uri = URI.parse(url)
request = Net::HTTP::Get.new(uri.path+'?'+uri.query)
http = Net::HTTP.new(uri.host,uri.port)
#http.use_ssl = true
response = http.start {|http| http.request(request) }
print response.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment