Skip to content

Instantly share code, notes, and snippets.

@sdqali
Last active August 29, 2015 13:56
Show Gist options
  • Save sdqali/9242123 to your computer and use it in GitHub Desktop.
Save sdqali/9242123 to your computer and use it in GitHub Desktop.
# testing using ruby 1.9.3
# Example code to access the Mingle API with an HMAC key pair.
# This example uses the api_auth gem (v 1.0.3)
require "uri"
require "net/https"
require "time"
require "rubygems"
require "api_auth"
MINGLE_URL = "https://your-org.mingle-api.thoughtworks.com/api/v2/projects.xml"
access_key_id = "your_username"
secret_access_key = "???????????????"
uri = URI.parse(MINGLE_URL)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri.request_uri)
ApiAuth.sign!(request, access_key_id, secret_access_key)
response = http.request(request)
puts response.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment