Class: Twilio::REST::Media

Inherits:
Domain
  • Object
show all
Defined in:
lib/twilio-ruby/rest/media.rb,
lib/twilio-ruby/rest/media/v1.rb,
lib/twilio-ruby/rest/media/v1/media_processor.rb,
lib/twilio-ruby/rest/media/v1/media_recording.rb,
lib/twilio-ruby/rest/media/v1/player_streamer.rb,
lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb

Defined Under Namespace

Classes: V1

Instance Attribute Summary

Attributes inherited from Domain

#client

Instance Method Summary collapse

Methods inherited from Domain

#absolute_url, #request

Constructor Details

#initialize(twilio) ⇒ Media

Initialize the Media Domain


14
15
16
17
18
19
20
21
22
23
# File 'lib/twilio-ruby/rest/media.rb', line 14

def initialize(twilio)
  super

  @base_url = 'https://media.twilio.com'
  @host = 'media.twilio.com'
  @port = 443

  # Versions
  @v1 = nil
end

Instance Method Details

#media_processor(sid = :unset) ⇒ Twilio::REST::Media::V1::MediaProcessorInstance, Twilio::REST::Media::V1::MediaProcessorList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string generated to identify the MediaProcessor resource.

Returns:


36
37
38
# File 'lib/twilio-ruby/rest/media.rb', line 36

def media_processor(sid=:unset)
  self.v1.media_processor(sid)
end

#media_recording(sid = :unset) ⇒ Twilio::REST::Media::V1::MediaRecordingInstance, Twilio::REST::Media::V1::MediaRecordingList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string generated to identify the MediaRecording resource.

Returns:


45
46
47
# File 'lib/twilio-ruby/rest/media.rb', line 45

def media_recording(sid=:unset)
  self.v1.media_recording(sid)
end

#player_streamer(sid = :unset) ⇒ Twilio::REST::Media::V1::PlayerStreamerInstance, Twilio::REST::Media::V1::PlayerStreamerList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string generated to identify the PlayerStreamer resource.

Returns:


54
55
56
# File 'lib/twilio-ruby/rest/media.rb', line 54

def player_streamer(sid=:unset)
  self.v1.player_streamer(sid)
end

#to_sObject

Provide a user friendly representation


60
61
62
# File 'lib/twilio-ruby/rest/media.rb', line 60

def to_s
  '#<Twilio::REST::Media>'
end

#v1Object

Version v1 of media


27
28
29
# File 'lib/twilio-ruby/rest/media.rb', line 27

def v1
  @v1 ||= V1.new self
end