class MingleEvents::MingleOauthAccess
Client for Mingle’s experimental OAuth 2.0 support in 3.0
Attributes
base_url[R]
Public Class Methods
new(base_url, token, http=Http)
click to toggle source
# File lib/mingle_events/mingle_oauth_access.rb 7 def initialize(base_url, token, http=Http) 8 @base_url = base_url 9 @token = token 10 @http = http 11 end
Public Instance Methods
fetch_page(location)
click to toggle source
# File lib/mingle_events/mingle_oauth_access.rb 13 def fetch_page(location) 14 location = @base_url + location if location[0..0] == '/' 15 @http.get(location) do |req| 16 req['Authorization'] = %{Token token="#{@token}"} 17 end 18 end