class MingleEvents::MingleHmacAuthAccess

Client for Mingle’s experimental HMAC api auth support

Attributes

base_url[R]

Public Class Methods

new(base_url, login, api_key, http=Http) click to toggle source
   # File lib/mingle_events/mingle_hmac_auth_access.rb
 6 def initialize(base_url, login, api_key, http=Http)
 7   @base_url = base_url
 8   @login = login
 9   @api_key = api_key
10   @http = http
11 end

Public Instance Methods

fetch_page(location) click to toggle source
   # File lib/mingle_events/mingle_hmac_auth_access.rb
13 def fetch_page(location)
14   location  = @base_url + location if location[0..0] == '/'
15   @http.get(location) do |req|
16     ApiAuth.sign!(req, @login, @api_key)
17   end
18 end