class XporterOnDemand::Client
Attributes
available_scopes[R]
estab[R]
token[R]
uri[R]
Public Class Methods
new(token = nil, args = {})
click to toggle source
# File lib/xporter_on_demand/client.rb, line 13 def initialize(token = nil, args = {}) @token = token @args = args details = token_details @available_scopes = details["Scopes"] @estab = @args.delete(:estab) @estab ||= details["Estab"] args[:edubase] ? edubase_client : school_client end
Public Instance Methods
edubase_client()
click to toggle source
This is not finished and probably won't even work.
# File lib/xporter_on_demand/client.rb, line 34 def edubase_client @uri = API_PATH + "RunQuery/?" end
school_client()
click to toggle source
# File lib/xporter_on_demand/client.rb, line 29 def school_client @uri = API_PATH + "School/" + estab + "/" end
Private Instance Methods
get_info(endpoint)
click to toggle source
# File lib/xporter_on_demand/client.rb, line 39 def get_info(endpoint) get(url: API_PATH + endpoint) end