class Upwork::Api::Routers::Snapshot

Snapshot

Constants

ENTRY_POINT

Public Class Methods

new(client) click to toggle source

Init

Arguments:

client: (Client)
# File lib/upwork/api/routers/snapshot.rb, line 25
def initialize(client)
  @client = client
  @client.epoint = ENTRY_POINT 
end

Public Instance Methods

delete_by_contract(contract, ts) click to toggle source

Delete snapshot by specific contract Arguments:

contract: (String)
ts: (String)
# File lib/upwork/api/routers/snapshot.rb, line 55
def delete_by_contract(contract, ts)
  $LOG.i "running " + __method__.to_s
  @client.delete '/team/v3/snapshots/contracts/' + contract + '/' + ts
end
get_by_contract(contract, ts) click to toggle source

Get snapshot info by specific contract

Arguments:

contract: (String)
ts: (String)
# File lib/upwork/api/routers/snapshot.rb, line 35
def get_by_contract(contract, ts)
  $LOG.i "running " + __method__.to_s
  @client.get '/team/v3/snapshots/contracts/' + contract + '/' + ts
end
update_by_contract(contract, ts, params) click to toggle source

Update snapshot by specific contract

Arguments:

contract: (String)
ts: (String)
params: (Hash)
# File lib/upwork/api/routers/snapshot.rb, line 46
def update_by_contract(contract, ts, params)
  $LOG.i "running " + __method__.to_s
  @client.put '/team/v3/snapshots/contracts/' + contract + '/' + ts, params
end