Sha256: 20bef78ef04d1ba7e05c328a90457cd2f4b57dc9a7ff727d02462da8fba68d61

Contents?: true

Size: 1.32 KB

Versions: 3

Compression:

Stored size: 1.32 KB

Contents

module MarketoApi
  module API
    module Stats
      include Base

      # Public: Returns the daily usage of API requests
      #
      # Example
      #   client.daily_usage
      #   # => { ... }
      #
      # Returns the Hash representation of the usage call.
      def daily_usage
        api_get('stats/usage.json')
      end

      # Public: Returns the count of each error type encountered
      # in the current day
      #
      # Example
      #   client.daily_errors
      #   # => { ... }
      #
      # Returns the Hash representation of the usage call.
      def daily_errors
        api_get('stats/errors.json')
      end

      # Public: Returns a list of API users and the number of calls
      # they have consumed in the past 7 days.
      #
      # Example
      #   client.weekly_usage
      #   # => { ... }
      #
      # Returns the Hash representation of the usage call.
      def weekly_usage
        api_get('stats/usage/last7days.json')
      end

      # Public: Returns a list of API users and a count of each error type
      # they have encountered in the past 7 days
      #
      # Example
      #   client.weekly_errors
      #   # => { ... }
      #
      # Returns the Hash representation of the usage call.
      def weekly_errors
        api_get('stats/errors/last7days.json')
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
marketo_api-0.3.0.pre.alpha lib/marketo_api/api/stats.rb
marketo_api-0.1.1.pre.alpha lib/marketo_api/api/stats.rb
marketo_api-0.0.7.pre.alpha lib/marketo_api/api/stats.rb