Class: Upwork::Api::Routers::Activities::Team

Inherits:
Object
  • Object
show all
Defined in:
lib/upwork/api/routers/activities/team.rb

Overview

Team Activities

Constant Summary collapse

ENTRY_POINT =
'api'

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Team

Init

Arguments:

client: (Client)


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

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

Instance Method Details

#add_activity(company, team, params) ⇒ Object

Create an oTask/Activity record within a team

Arguments:

company: (String)
team: (String)
params: (Hash)


56
57
58
# File 'lib/upwork/api/routers/activities/team.rb', line 56

def add_activity(company, team, params)
  @client.post '/otask/v1/tasks/companies/' + company + '/teams/' + team + '/tasks', params
end

#archive_activities(company, team, code) ⇒ Object

Archive specific oTask/Activity record within a team

Arguments:

company: (String)
team: (String)
code: (String)


77
78
79
# File 'lib/upwork/api/routers/activities/team.rb', line 77

def archive_activities(company, team, code)
  @client.put '/otask/v1/tasks/companies/' + company + '/teams/' + team + '/archive/' + code
end

#get_list(company, team) ⇒ Object

List all oTask/Activity records within a team

Arguments:

company: (String)
team: (String)


36
37
38
# File 'lib/upwork/api/routers/activities/team.rb', line 36

def get_list(company, team)
  get_by_type company, team, nil
end

#get_specific_list(company, team, code) ⇒ Object

List all oTask/Activity records within a Company by specified code(s)

Arguments:

company: (String)
team: (String)
code: (String)


46
47
48
# File 'lib/upwork/api/routers/activities/team.rb', line 46

def get_specific_list(company, team, code)
  get_by_type company, team, code
end

#unarchive_activities(company, team, code) ⇒ Object

Unarchive specific oTask/Activity record within a team

Arguments:

company: (String)
team: (String)
code: (String)


87
88
89
# File 'lib/upwork/api/routers/activities/team.rb', line 87

def unarchive_activities(company, team, code)
  @client.put '/otask/v1/tasks/companies/' + company + '/teams/' + team + '/unarchive/' + code
end

#update_activities(company, team, code, params) ⇒ Object

Update specific oTask/Activity record within a team

Arguments:

company: (String)
team: (String)
code: (String)
params: (Hash)


67
68
69
# File 'lib/upwork/api/routers/activities/team.rb', line 67

def update_activities(company, team, code, params)
  @client.put '/otask/v1/tasks/companies/' + company + '/teams/' + team + '/tasks/' + code, params
end

#update_batch(company, params) ⇒ Object

Update a group of oTask/Activity records within a company

Arguments:

company: (String)
params: (Hash)


96
97
98
# File 'lib/upwork/api/routers/activities/team.rb', line 96

def update_batch(company, params)
  @client.put '/otask/v1/tasks/companies/' + company + '/tasks/batch', params
end