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, date, params = {}) ⇒ Object

Get Workdiary by Company Arguments:

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


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

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

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

Get Work Diary by Contract Arguments:

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


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

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