Class: FastpixClient::Fastpixapi
- Inherits:
-
Object
- Object
- FastpixClient::Fastpixapi
- Extended by:
- T::Sig
- Defined in:
- lib/fastpix_client/fastpixapi.rb
Instance Attribute Summary collapse
-
#dimensions ⇒ Object
Returns the value of attribute dimensions.
-
#drm_configurations ⇒ Object
Returns the value of attribute drm_configurations.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#in_video_ai_features ⇒ Object
Returns the value of attribute in_video_ai_features.
-
#input_video ⇒ Object
Returns the value of attribute input_video.
-
#live_playback ⇒ Object
Returns the value of attribute live_playback.
-
#manage_live_stream ⇒ Object
Returns the value of attribute manage_live_stream.
-
#manage_videos ⇒ Object
Returns the value of attribute manage_videos.
-
#metrics ⇒ Object
Returns the value of attribute metrics.
-
#playback ⇒ Object
Returns the value of attribute playback.
-
#playlist ⇒ Object
Returns the value of attribute playlist.
-
#signing_keys ⇒ Object
Returns the value of attribute signing_keys.
-
#simulcast_stream ⇒ Object
Returns the value of attribute simulcast_stream.
-
#start_live_stream ⇒ Object
Returns the value of attribute start_live_stream.
-
#views ⇒ Object
Returns the value of attribute views.
Instance Method Summary collapse
- #get_url(base_url:, url_variables: nil) ⇒ Object
- #init_sdks ⇒ Object
-
#initialize(client: nil, retry_config: nil, timeout_ms: nil, security: nil, security_source: nil, server_idx: nil, server_url: nil, url_params: nil) ⇒ Fastpixapi
constructor
A new instance of Fastpixapi.
Constructor Details
#initialize(client: nil, retry_config: nil, timeout_ms: nil, security: nil, security_source: nil, server_idx: nil, server_url: nil, url_params: nil) ⇒ Fastpixapi
Returns a new instance of Fastpixapi.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/fastpix_client/fastpixapi.rb', line 43 def initialize(client: nil, retry_config: nil, timeout_ms: nil, security: nil, security_source: nil, server_idx: nil, server_url: nil, url_params: nil) = { request: { params_encoder: Faraday::FlatParamsEncoder } } [:request][:timeout] = (timeout_ms.to_f / 1000) unless timeout_ms.nil? client ||= Faraday.new(**) do |f| f.request :multipart, { flat_encode: true } # f.response :logger, nil, { headers: true, bodies: true, errors: true } end if !server_url.nil? if !url_params.nil? server_url = Utils.template_url(server_url, url_params) end end server_idx = 0 if server_idx.nil? hooks = SDKHooks::Hooks.new @sdk_configuration = SDKConfiguration.new( client, hooks, retry_config, timeout_ms, security, security_source, server_url, server_idx ) @sdk_configuration = hooks.sdk_init(config: @sdk_configuration) init_sdks end |
Instance Attribute Details
#dimensions ⇒ Object
Returns the value of attribute dimensions.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def dimensions @dimensions end |
#drm_configurations ⇒ Object
Returns the value of attribute drm_configurations.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def drm_configurations @drm_configurations end |
#errors ⇒ Object
Returns the value of attribute errors.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def errors @errors end |
#in_video_ai_features ⇒ Object
Returns the value of attribute in_video_ai_features.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def in_video_ai_features @in_video_ai_features end |
#input_video ⇒ Object
Returns the value of attribute input_video.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def input_video @input_video end |
#live_playback ⇒ Object
Returns the value of attribute live_playback.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def live_playback @live_playback end |
#manage_live_stream ⇒ Object
Returns the value of attribute manage_live_stream.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def manage_live_stream @manage_live_stream end |
#manage_videos ⇒ Object
Returns the value of attribute manage_videos.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def manage_videos @manage_videos end |
#metrics ⇒ Object
Returns the value of attribute metrics.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def metrics @metrics end |
#playback ⇒ Object
Returns the value of attribute playback.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def playback @playback end |
#playlist ⇒ Object
Returns the value of attribute playlist.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def playlist @playlist end |
#signing_keys ⇒ Object
Returns the value of attribute signing_keys.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def signing_keys @signing_keys end |
#simulcast_stream ⇒ Object
Returns the value of attribute simulcast_stream.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def simulcast_stream @simulcast_stream end |
#start_live_stream ⇒ Object
Returns the value of attribute start_live_stream.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def start_live_stream @start_live_stream end |
#views ⇒ Object
Returns the value of attribute views.
19 20 21 |
# File 'lib/fastpix_client/fastpixapi.rb', line 19 def views @views end |
Instance Method Details
#get_url(base_url:, url_variables: nil) ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/fastpix_client/fastpixapi.rb', line 99 def get_url(base_url:, url_variables: nil) sd_base_url, = @sdk_configuration.get_server_details if base_url.nil? base_url = sd_base_url end if url_variables.nil? url_variables = end return Utils.template_url base_url, url_variables end |
#init_sdks ⇒ Object
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/fastpix_client/fastpixapi.rb', line 80 def init_sdks @input_video = InputVideo.new(@sdk_configuration) @manage_videos = ManageVideos.new(@sdk_configuration) @in_video_ai_features = InVideoAIFeatures.new(@sdk_configuration) @playback = Playback.new(@sdk_configuration) @playlist = Playlist.new(@sdk_configuration) @drm_configurations = DRMConfigurations.new(@sdk_configuration) @start_live_stream = StartLiveStream.new(@sdk_configuration) @manage_live_stream = ManageLiveStream.new(@sdk_configuration) @live_playback = LivePlayback.new(@sdk_configuration) @simulcast_stream = SimulcastStream.new(@sdk_configuration) @signing_keys = SigningKeys.new(@sdk_configuration) @views = Views.new(@sdk_configuration) @dimensions = Dimensions.new(@sdk_configuration) @metrics = Metrics.new(@sdk_configuration) @errors = Errors.new(@sdk_configuration) end |