Module: Streamio

Defined in:
lib/streamio.rb,
lib/streamio/audio.rb,
lib/streamio/image.rb,
lib/streamio/model.rb,
lib/streamio/video.rb,
lib/streamio/errors.rb,
lib/streamio/player.rb,
lib/streamio/upload.rb,
lib/streamio/version.rb,
lib/streamio/playlist.rb,
lib/streamio/resource.rb,
lib/streamio/encoding_profile.rb

Defined Under Namespace

Modules: Errors Classes: Audio, EncodingProfile, Image, Model, Player, Playlist, Resource, Upload, Video

Constant Summary collapse

VERSION =
"1.0.8"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.hostObject

Returns the value of attribute host.



25
26
27
# File 'lib/streamio.rb', line 25

def host
  @host
end

.passwordObject

Returns the value of attribute password.



22
23
24
# File 'lib/streamio.rb', line 22

def password
  @password
end

.skip_ssl_verificationObject

Returns the value of attribute skip_ssl_verification.



24
25
26
# File 'lib/streamio.rb', line 24

def skip_ssl_verification
  @skip_ssl_verification
end

.use_sslObject Also known as: use_ssl?

Returns the value of attribute use_ssl.



23
24
25
# File 'lib/streamio.rb', line 23

def use_ssl
  @use_ssl
end

.usernameObject

Returns the value of attribute username.



21
22
23
# File 'lib/streamio.rb', line 21

def username
  @username
end

Class Method Details

.authenticated_api_baseObject



54
55
56
# File 'lib/streamio.rb', line 54

def authenticated_api_base
  "#{protocol}#{username}:#{password}@#{host}/api/v1"
end

.configure {|_self| ... } ⇒ Object

The idiomatic configure block for the Streamio gem. Basically a shortcut for the Streamio module attributes.

Examples:

Configure your API username and password.

Streamio.configure do |config|
  config.username = "my_awesome_account"
  config.password = "3633b4a027d74ead0038addff89550"
end

Yields:

  • (_self)

Yield Parameters:

  • _self (Streamio)

    the object that the method was called on



35
36
37
# File 'lib/streamio.rb', line 35

def configure
  yield self
end

.protocolObject



45
46
47
# File 'lib/streamio.rb', line 45

def protocol
  use_ssl? ? "https://" : "http://"
end