Class: Upwork::Api::Routers::Snapshot
- Inherits:
-
Object
- Object
- Upwork::Api::Routers::Snapshot
- Defined in:
- lib/upwork/api/routers/snapshot.rb
Overview
Snapshot
Constant Summary collapse
- ENTRY_POINT =
'api'
Instance Method Summary collapse
-
#delete_by_contract(contract, ts) ⇒ Object
Delete snapshot by specific contract Arguments: contract: (String) ts: (String).
-
#get_by_contract(contract, ts) ⇒ Object
Get snapshot info by specific contract.
-
#initialize(client) ⇒ Snapshot
constructor
Init.
-
#update_by_contract(contract, ts, params) ⇒ Object
Update snapshot by specific contract.
Constructor Details
#initialize(client) ⇒ Snapshot
Init
Arguments:
client: (Client)
25 26 27 28 |
# File 'lib/upwork/api/routers/snapshot.rb', line 25 def initialize(client) @client = client @client.epoint = ENTRY_POINT end |
Instance Method Details
#delete_by_contract(contract, ts) ⇒ Object
Delete snapshot by specific contract Arguments:
contract: (String)
ts: (String)
55 56 57 58 |
# 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) ⇒ Object
Get snapshot info by specific contract
Arguments:
contract: (String)
ts: (String)
35 36 37 38 |
# 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) ⇒ Object
Update snapshot by specific contract
Arguments:
contract: (String)
ts: (String)
params: (Hash)
46 47 48 49 |
# 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 |