Class: Conversant::V3::Services::VMS::Analytics
- Inherits:
-
Object
- Object
- Conversant::V3::Services::VMS::Analytics
- Defined in:
- lib/conversant/v3/services/vms/analytics.rb
Overview
Analytics service for VMS metrics
Provides analytics data for video transcoding operations including duration and volume metrics for reporting and capacity planning.
Instance Attribute Summary collapse
-
#parent ⇒ VMS
readonly
The parent VMS service instance.
Instance Method Summary collapse
-
#initialize(parent) ⇒ Analytics
constructor
Initialize analytics service.
-
#transcoding(payload) ⇒ Array
Get transcoding duration analytics.
-
#volume(payload) ⇒ Array
Get volume analytics for transcoding.
Constructor Details
#initialize(parent) ⇒ Analytics
Initialize analytics service
36 37 38 |
# File 'lib/conversant/v3/services/vms/analytics.rb', line 36 def initialize(parent) @parent = parent end |
Instance Attribute Details
#parent ⇒ VMS (readonly)
Returns the parent VMS service instance.
31 32 33 |
# File 'lib/conversant/v3/services/vms/analytics.rb', line 31 def parent @parent end |
Instance Method Details
#transcoding(payload) ⇒ Array
Get transcoding duration analytics
Retrieves duration metrics for video transcoding operations over a specified time range. Useful for capacity planning and billing calculations.
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/conversant/v3/services/vms/analytics.rb', line 60 def transcoding(payload) merged_payload = payload.merge(type: nil) response = @parent.send(:call, 'GET', "/reporting/vms/transcoding/duration?#{merged_payload.to_query}") return [] if response.nil? JSON.parse(response) rescue StandardError => e logger.error "#{@parent.send(:identifier)}.METHOD:#{__method__}.EXCEPTION:#{e.}" [] end |
#volume(payload) ⇒ Array
Get volume analytics for transcoding
Retrieves volume metrics (in bytes/GB) for transcoded video data over a specified time range. Useful for storage capacity planning and bandwidth analysis.
91 92 93 94 95 96 97 98 99 100 |
# File 'lib/conversant/v3/services/vms/analytics.rb', line 91 def volume(payload) merged_payload = payload.merge(type: nil) response = @parent.send(:call, 'GET', "/reporting/vms/transcoding/volume?#{merged_payload.to_query}") return [] if response.nil? JSON.parse(response) rescue StandardError => e logger.error "#{@parent.send(:identifier)}.METHOD:#{__method__}.EXCEPTION:#{e.}" [] end |