Sha256: c009a58dc1d4156d219e0d958faab70caf9adeb5aa3e0f4c27915f68cfe1b8c9

Contents?: true

Size: 1019 Bytes

Versions: 14

Compression:

Stored size: 1019 Bytes

Contents

module Zype
  # Read more at https://docs.zype.com/v1.0/reference#encoders
  #
  # @since 0.1.0
  class Encoders < Zype::BaseModel
    # Returns encoder matching the encoder_name
    #
    # @param encoder_name [String] the name of the encoder
    # @return [Hash] properties of the encoder
    def find(encoder_name:)
      client.execute(method: :get, path: "/live/encoders/#{encoder_name}")
    end

    # Starts encoder matching the encoder_name
    #
    # @param encoder_name [String] the name of the encoder
    # @return [Hash] properties of the encoder
    def start(encoder_name:)
      client.execute(method: :post, path: "/live/encoders/#{encoder_name}/start")
    end

    # Stops encoder matching the encoder_name
    #
    # @param encoder_name [String] the name of the encoder
    # @return [Hash] properties of the encoder
    def stop(encoder_name:)
      client.execute(method: :post, path: "/live/encoders/#{encoder_name}/stop")
    end

    def path
      @path = "live/encoders"
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
zype-0.20.0 lib/zype/models/encoders.rb
zype-0.19.0 lib/zype/models/encoders.rb
zype-0.18.0 lib/zype/models/encoders.rb
zype-0.17.0 lib/zype/models/encoders.rb
zype-0.16.1 lib/zype/models/encoders.rb
zype-0.16.0 lib/zype/models/encoders.rb
zype-0.15.0 lib/zype/models/encoders.rb
zype-0.14.0 lib/zype/models/encoders.rb
zype-0.13.0 lib/zype/models/encoders.rb
zype-0.12.0 lib/zype/models/encoders.rb
zype-0.11.0 lib/zype/models/encoders.rb
zype-0.10.0 lib/zype/models/encoders.rb
zype-0.9.0 lib/zype/models/encoders.rb
zype-0.8.0 lib/zype/models/encoders.rb