Class: BrickFTP::RESTfulAPI::CountUsers

Inherits:
Object
  • Object
show all
Includes:
Command
Defined in:
lib/brick_ftp/restful_api/count_users.rb

Overview

Count users

See Also:

Instance Method Summary collapse

Methods included from Command

included, #initialize

Instance Method Details

#callInteger

Returns a count of the number of users for the current site.

Returns:

  • (Integer)

    count



16
17
18
19
# File 'lib/brick_ftp/restful_api/count_users.rb', line 16

def call
  res = client.get('/api/rest/v1/users.json?action=count')
  res['data']['count']
end