Class: PsuIdentity::DirectoryService::Client
- Inherits:
-
Object
- Object
- PsuIdentity::DirectoryService::Client
- Defined in:
- lib/psu_identity/directory_service/client.rb
Instance Attribute Summary collapse
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
Instance Method Summary collapse
-
#initialize(base_url: '/directory-service-web/resources') ⇒ Client
constructor
A new instance of Client.
- #userid(userid) ⇒ Object
Constructor Details
#initialize(base_url: '/directory-service-web/resources') ⇒ Client
Returns a new instance of Client.
16 17 18 |
# File 'lib/psu_identity/directory_service/client.rb', line 16 def initialize(base_url: '/directory-service-web/resources') @base_url = base_url end |
Instance Attribute Details
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
13 14 15 |
# File 'lib/psu_identity/directory_service/client.rb', line 13 def base_url @base_url end |
Instance Method Details
#userid(userid) ⇒ Object
22 23 24 |
# File 'lib/psu_identity/directory_service/client.rb', line 22 def userid(userid) process_userid_response connection.get("#{base_url}/people/#{userid}") end |