Class: ClassLink::Client
- Inherits:
-
Object
- Object
- ClassLink::Client
- Includes:
- Interface
- Defined in:
- lib/classlink_client/client.rb
Constant Summary collapse
- DIRECT_OPTIONS =
%i(client_id client_secret endpoint)
- PROXY_OPTIONS =
%i(access_token app_id)
Constants included from Interface
Interface::METHOD_NAME_PROXY, Interface::RESOURCES
Instance Attribute Summary collapse
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#proxy_api ⇒ Object
readonly
Returns the value of attribute proxy_api.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from RequestSigning
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
19 20 21 22 23 24 25 26 |
# File 'lib/classlink_client/client.rb', line 19 def initialize() () # if an endpoint hasn't been supplied, then we're using the proxy @proxy_api = !endpoint @base_url = endpoint || "https://oneroster-proxy.classlink.io/#{app_id}" @base_url << "/ims/oneroster/v1p1/" end |
Instance Attribute Details
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
17 18 19 |
# File 'lib/classlink_client/client.rb', line 17 def base_url @base_url end |
#proxy_api ⇒ Object (readonly)
Returns the value of attribute proxy_api.
17 18 19 |
# File 'lib/classlink_client/client.rb', line 17 def proxy_api @proxy_api end |