Sha256: 740d27d86dc14d2a0c97a08261487161dc403d51fee08e22999ccb59a0bf56b6

Contents?: true

Size: 768 Bytes

Versions: 1

Compression:

Stored size: 768 Bytes

Contents

module DataSift
  #
  # Class for accessing DataSift's Account API
  class Account < DataSift::ApiResource
    # Check your account usage for a given period and timeframe
    #
    # @param period [String] (Optional) Period is one of either hourly, daily or monthly
    # @param start_time [Integer] (Optional) Unix timestamp of the start of the period
    #   you are querying
    # @param end_time [Integer] (Optional) Unix timestamp of the end of the period
    #   you are querying
    # @return [Object] API reponse object
    def usage(start_time, end_time, period = '')
      params = { start: start_time, end: end_time }
      params.merge!(period: period) unless period.empty?

      DataSift.request(:GET, 'account/usage', @config, params)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datasift-3.10.0 lib/account.rb