Class: PsuIdentity::DirectoryService::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/psu_identity/directory_service/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_url: '/directory-service-web/resources') ⇒ Client

Returns a new instance of Client.

Parameters:

  • base_url (String) (defaults to: '/directory-service-web/resources')


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_urlObject (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

Parameters:

  • args (Hash)

    of options to pass to the endpoint



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