Sha256: 8e6b0c00d3bda03c941fbd26179ecb2772ee0cda3ac565c42139d42b017be42f
Contents?: true
Size: 586 Bytes
Versions: 23
Compression:
Stored size: 586 Bytes
Contents
module Sorenson module Services class Metric < Base def self.all(offset = nil, quantity = nil) get_from("/metrics").collect do |event| Event.new(event) end end def self.total_plays get_from("/metrics/total_plays")['total_plays'].to_i end def self.storage_used(start_date = nil, end_date = nil) options = {} options.merge(:start_date => start_date, :end_date => end_date) if start_date && end_date get_from("/metrics/storage", options)['storage_used'] end end end end
Version data entries
23 entries across 23 versions & 1 rubygems