Class: Upwork::Api::Routers::Workdiary

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

Overview

Work Diary

Constant Summary collapse

ENTRY_POINT =
'api'

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Workdiary

Init

Arguments:

client: (Client)


25
26
27
28
# File 'lib/upwork/api/routers/workdiary.rb', line 25

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

Instance Method Details

#get(company, username, date, params = {}) ⇒ Object

Get Workdiary Arguments:

company: (String)
username: (String)
date: (String)
params: (Hash)


36
37
38
39
# File 'lib/upwork/api/routers/workdiary.rb', line 36

def get(company, username, date, params = {})
  $LOG.i "running " + __method__.to_s
  @client.get '/team/v1/workdiaries/' + company + '/' + username + '/' + date, params
end

#get_by_contract(contract, date, params = {}) ⇒ Object

Get Work Diary by Contract Arguments:

contract: (String)
date: (String)
params: (Hash)


46
47
48
49
# File 'lib/upwork/api/routers/workdiary.rb', line 46

def get_by_contract(contract, date, params = {})
  $LOG.i "running " + __method__.to_s
  @client.get '/team/v2/workdiaries/contracts/' + contract + '/' + date, params
end