Class: Zype::Encoders

Inherits:
BaseModel show all
Defined in:
lib/zype/models/encoders.rb

Overview

Since:

  • 0.1.0

Constant Summary

Constants inherited from BaseModel

BaseModel::ACCEPTED_KEYS

Instance Attribute Summary

Attributes inherited from BaseModel

#client

Instance Method Summary collapse

Methods inherited from BaseModel

#all, #auth=, #create, #delete, #initialize, #update

Constructor Details

This class inherits a constructor from Zype::BaseModel

Instance Method Details

#find(encoder_name:) ⇒ Hash

Returns encoder matching the encoder_name

Parameters:

  • encoder_name (String)

    the name of the encoder

Returns:

  • (Hash)

    properties of the encoder

Since:

  • 0.1.0



10
11
12
# File 'lib/zype/models/encoders.rb', line 10

def find(encoder_name:)
  client.execute(method: :get, path: "/live/encoders/#{encoder_name}")
end

#pathObject

Since:

  • 0.1.0



30
31
32
# File 'lib/zype/models/encoders.rb', line 30

def path
  @path = "live/encoders"
end

#start(encoder_name:) ⇒ Hash

Starts encoder matching the encoder_name

Parameters:

  • encoder_name (String)

    the name of the encoder

Returns:

  • (Hash)

    properties of the encoder

Since:

  • 0.1.0



18
19
20
# File 'lib/zype/models/encoders.rb', line 18

def start(encoder_name:)
  client.execute(method: :post, path: "/live/encoders/#{encoder_name}/start")
end

#stop(encoder_name:) ⇒ Hash

Stops encoder matching the encoder_name

Parameters:

  • encoder_name (String)

    the name of the encoder

Returns:

  • (Hash)

    properties of the encoder

Since:

  • 0.1.0



26
27
28
# File 'lib/zype/models/encoders.rb', line 26

def stop(encoder_name:)
  client.execute(method: :post, path: "/live/encoders/#{encoder_name}/stop")
end