Module: Streamio

Defined in:
lib/streamio.rb,
lib/streamio/image.rb,
lib/streamio/model.rb,
lib/streamio/video.rb,
lib/streamio/upload.rb,
lib/streamio/version.rb,
lib/streamio/encoding_profile.rb

Defined Under Namespace

Classes: EncodingProfile, Image, Model, Upload, Video

Constant Summary collapse

VERSION =
"0.7.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.hostObject

Returns the value of attribute host.



17
18
19
# File 'lib/streamio.rb', line 17

def host
  @host
end

.passwordObject

Returns the value of attribute password.



15
16
17
# File 'lib/streamio.rb', line 15

def password
  @password
end

.use_sslObject Also known as: use_ssl?

Returns the value of attribute use_ssl.



16
17
18
# File 'lib/streamio.rb', line 16

def use_ssl
  @use_ssl
end

.usernameObject

Returns the value of attribute username.



14
15
16
# File 'lib/streamio.rb', line 14

def username
  @username
end

Class Method Details

.authenticated_api_baseObject



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

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



27
28
29
# File 'lib/streamio.rb', line 27

def configure
  yield self
end

.protocolObject



37
38
39
# File 'lib/streamio.rb', line 37

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