Class: TeamdriveApi::Host

Inherits:
Base
  • Object
show all
Defined in:
lib/teamdrive_api/host.rb

Overview

API Client for the TeamDrive Host Server. See the TeamDrive Host docs for more informations on specific commands.

Instance Attribute Summary

Attributes inherited from Base

#uri

Instance Method Summary collapse

Methods inherited from Base

#initialize, #payload_for

Constructor Details

This class inherits a constructor from TeamdriveApi::Base

Instance Method Details

#set_depot(username, depot_id, args) ⇒ Boolean

Set Depot Limits (added in 3.0.003)

The values of +<disclimit>+ and +<trafficlimit>+ is in Bytes:
+1 KB = 1024 Bytes+.

Parameters:

  • username (String)
  • depot_id (#to_s)
  • args (Hash)

Returns:

  • (Boolean)

    success?



14
15
16
17
18
19
20
21
22
23
# File 'lib/teamdrive_api/host.rb', line 14

def set_depot(username, depot_id, args)
  require_all of: [:disclimit], in_hash: args
  args = args.merge(
    username: username,
    depotid: depot_id
  )

  res = send_request :setdepot, args
  res[:intresult].eql?('0')
end