Class: Conversant::V3::Services::LMS::Partner::Report
- Inherits:
-
Object
- Object
- Conversant::V3::Services::LMS::Partner::Report
- Defined in:
- lib/conversant/v3/services/lms/partner/report.rb
Overview
LMS Report analytics for detailed partner-level reporting
Provides detailed reporting methods for transcoding, recording, jobs, DRM analytics, and business usage data.
Instance Attribute Summary collapse
-
#parent ⇒ Conversant::V3::Services::LMS::Partner::Analytics
readonly
The parent analytics instance.
Instance Method Summary collapse
-
#bussiness_live_usage(payload) ⇒ Hash?
Fetches business live usage data.
-
#duration_v2_transcoding(payload) ⇒ Hash?
Fetches v2 transcoding duration data.
-
#initialize(parent) ⇒ Report
constructor
Initialize partner LMS report service.
-
#jobs(payload) ⇒ Hash?
Fetches transcoding jobs count analytics.
-
#recordings(payload) ⇒ Hash?
Fetches recording analytics data.
-
#transcodings(payload) ⇒ Hash?
Fetches transcoding analytics data.
Constructor Details
#initialize(parent) ⇒ Report
Initialize partner LMS report service
21 22 23 |
# File 'lib/conversant/v3/services/lms/partner/report.rb', line 21 def initialize(parent) @parent = parent end |
Instance Attribute Details
#parent ⇒ Conversant::V3::Services::LMS::Partner::Analytics (readonly)
Returns the parent analytics instance.
16 17 18 |
# File 'lib/conversant/v3/services/lms/partner/report.rb', line 16 def parent @parent end |
Instance Method Details
#bussiness_live_usage(payload) ⇒ Hash?
Fetches business live usage data
Retrieves business-level live streaming usage data aggregated by month, including filtering by customer type and metric selection type.
146 147 148 149 150 151 152 153 154 |
# File 'lib/conversant/v3/services/lms/partner/report.rb', line 146 def bussiness_live_usage(payload) response = @parent.instance_variable_get(:@parent).send(:call, 'GET', "/v4/reporting/lms/business/usage/search?#{payload.to_query}") return nil if response.nil? JSON.parse(response) rescue StandardError => e logger.error "#{identifier}.METHOD:#{__method__}.EXCEPTION:#{e.message}" nil end |
#duration_v2_transcoding(payload) ⇒ Hash?
Fetches v2 transcoding duration data
Retrieves transcoding duration metrics using the v2 API endpoint. This provides backward compatibility with the legacy reporting format.
119 120 121 122 123 124 125 126 127 |
# File 'lib/conversant/v3/services/lms/partner/report.rb', line 119 def duration_v2_transcoding(payload) response = @parent.instance_variable_get(:@parent).send(:call, 'GET', "/v2/reporting/lms/transcoding/duration?#{payload.to_query}") return nil if response.nil? JSON.parse(response) rescue StandardError => e logger.error "#{identifier}.METHOD:#{__method__}.EXCEPTION:#{e.message}" nil end |
#jobs(payload) ⇒ Hash?
Fetches transcoding jobs count analytics
Retrieves the number of transcoding jobs executed within a specified time range, useful for understanding service usage patterns and billing.
93 94 95 96 97 98 99 100 101 |
# File 'lib/conversant/v3/services/lms/partner/report.rb', line 93 def jobs(payload) response = @parent.instance_variable_get(:@parent).send(:call, 'GET', "/reporting/lms/transcoding/number?#{payload.to_query}") return nil if response.nil? JSON.parse(response) rescue StandardError => e logger.error "#{identifier}.METHOD:#{__method__}.EXCEPTION:#{e.message}" nil end |
#recordings(payload) ⇒ Hash?
Fetches recording analytics data
Retrieves detailed recording duration metrics for live streaming recordings, including breakdown by codec and resolution for billing purposes.
67 68 69 70 71 72 73 74 75 |
# File 'lib/conversant/v3/services/lms/partner/report.rb', line 67 def recordings(payload) response = @parent.instance_variable_get(:@parent).send(:call, 'GET', "/reporting/lms/recording/duration?#{payload.to_query}") return nil if response.nil? JSON.parse(response) rescue StandardError => e logger.error "#{identifier}.METHOD:#{__method__}.EXCEPTION:#{e.message}" nil end |
#transcodings(payload) ⇒ Hash?
Fetches transcoding analytics data
Retrieves detailed transcoding duration metrics for live streaming services, useful for billing calculations and capacity planning.
41 42 43 44 45 46 47 48 49 |
# File 'lib/conversant/v3/services/lms/partner/report.rb', line 41 def transcodings(payload) response = @parent.instance_variable_get(:@parent).send(:call, 'GET', "/reporting/lms/transcoding/duration?#{payload.to_query}") return nil if response.nil? JSON.parse(response) rescue StandardError => e logger.error "#{identifier}.METHOD:#{__method__}.EXCEPTION:#{e.message}" nil end |