Skip to content

Instantly share code, notes, and snippets.

@thilko
Created September 24, 2012 13:53
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 thilko/3776056 to your computer and use it in GitHub Desktop.
Save thilko/3776056 to your computer and use it in GitHub Desktop.
jira team_dashboard integration sample
module Sources
module Number
module Jira
def tickets_for_filter_id(filter_id)
uri = URI('http://jira.blau.de/rest/api/latest/search')
params = { :maxResults => "1000", :jql => "filter = #{filter_id}"}
uri.query = URI.encode_www_form(params)
req = Net::HTTP::Get.new(uri.request_uri)
req.basic_auth 'user_name', 'xxxxxx'
res = Net::HTTP.start(uri.hostname, uri.port) {|http|
http.request(req)
}
bla = JSON.parse(res.body)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment