How to find Get Satisfaction topics by tag e.g. find all mozilla messaging topics tagged android
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
# 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