Sha256: 02ff35588b39141fae95095ba8e7122f57c9291093c6a26726e6c7cf19cf9226

Contents?: true

Size: 778 Bytes

Versions: 4

Compression:

Stored size: 778 Bytes

Contents

module Zencoder
  class Report < Resource

    def self.minutes(options={})
      get("/reports/minutes", merge_params(*extract_params(options)))
    end

    def self.all(options={})
      get("/reports/all", merge_params(*extract_params(options)))
    end

    def self.live(options={})
      get("/reports/live", merge_params(*extract_params(options)))
    end

    def self.vod(options={})
      get("/reports/vod", merge_params(*extract_params(options)))
    end


  protected

    def self.extract_params(options={})
      options = options.dup
      params = {
        :from => options.delete(:from),
        :to   => options.delete(:to),
        :grouping => options.delete(:grouping)
      }

      return options, params.delete_if { |k, v| v.nil? }
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
zencoder-2.5.1 lib/zencoder/report.rb
zencoder-2.5.0 lib/zencoder/report.rb
zencoder-2.4.6 lib/zencoder/report.rb
zencoder-2.4.5 lib/zencoder/report.rb