Module: Clients

Included in:
DashboardAPI
Defined in:
lib/clients.rb

Overview

Clients section of the Meraki Dashboard API

Author:

  • Joe Letizia

Instance Method Summary collapse

Instance Method Details

#get_client_info_for_device(serial, timespan) ⇒ Array

Return client usage for a specific device

Parameters:

  • serial (String)

    meraki serial number of the device

  • timespan (Integer)

    timespan up to 1 month in seconds to get client usage for

Returns:

  • (Array)

    an array of hashes for each client’s usage



8
9
10
11
# File 'lib/clients.rb', line 8

def get_client_info_for_device(serial, timespan)
  raise 'Timespan can not be larger than 2592000 seconds' if timespan.to_i > 2592000
  self.make_api_call("/devices/#{serial}/clients?timespan=#{timespan}", 'GET')
end