Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to find Get Satisfaction topics by tag e.g. find all mozilla messaging topics tagged android
# irb session follows:
require 'json'
require 'net/http'
require 'pp'
require 'Time'
def getResponse(url)
http = Net::HTTP.new("api.getsatisfaction.com",80)
url = "/" + url
resp, data = http.get(url, nil)
if resp.code != "200"
printf(STDERR,"Error:%d\n", resp.code)
return ""
end
result = JSON.parse(data)
return result
end
u="companies/mozilla_messaging/tags/android/topics.json"
r = getResponse(u)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment