Class: Upwork::Api::Routers::Organization::Teams

Inherits:
Object
  • Object
show all
Defined in:
lib/upwork/api/routers/organization/teams.rb

Overview

Teams inside Organization

Constant Summary collapse

ENTRY_POINT =
'api'

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Teams

Init

Arguments:

client: (Client)


26
27
28
29
# File 'lib/upwork/api/routers/organization/teams.rb', line 26

def initialize(client)
  @client = client
  @client.epoint = ENTRY_POINT 
end

Instance Method Details

#get_listObject

Get Teams info



32
33
34
35
# File 'lib/upwork/api/routers/organization/teams.rb', line 32

def get_list
  $LOG.i "running " + __method__.to_s
  @client.get '/hr/v2/teams'
end

#get_users_in_team(team_reference) ⇒ Object

Get Users in Team

Arguments:

team_reference: (String)


41
42
43
44
# File 'lib/upwork/api/routers/organization/teams.rb', line 41

def get_users_in_team(team_reference)
  $LOG.i "running " + __method__.to_s
  @client.get '/hr/v2/teams/' + team_reference + '/users'
end