Class: ApiConnectClient::User

Inherits:
Base
  • Object
show all
Defined in:
lib/api_connect_client/user.rb

Instance Method Summary collapse

Constructor Details

#initialize(username, password) ⇒ User

Returns a new instance of User.



3
4
5
6
7
8
9
10
# File 'lib/api_connect_client/user.rb', line 3

def initialize(username, password)
  super()
  @headers = {
    'X-IBM-APIManagement-Context': ApiConnectClient::Config.context
  }
  @username = username
  @password = password
end

Instance Method Details

#get_infoObject



12
13
14
# File 'lib/api_connect_client/user.rb', line 12

def get_info
  get("/me", @username, @password)
end

#list_organizationsObject



16
17
18
# File 'lib/api_connect_client/user.rb', line 16

def list_organizations
  get("/orgs", @username, @password)
end