Class: Vonage::Video::Archives

Inherits:
Namespace
  • Object
show all
Defined in:
lib/vonage/video/archives.rb

Defined Under Namespace

Classes: ListResponse

Instance Method Summary collapse

Instance Method Details

#add_stream(archive_id:, stream_id:, **params) ⇒ Response

Add a stream to a composed archive that was started with the streamMode set to “manual”.

See Also:

  • add docs link


120
121
122
# File 'lib/vonage/video/archives.rb', line 120

def add_stream(archive_id:, stream_id:, **params)
  request('/v2/project/' + @config.application_id + '/archive/' + archive_id + '/streams', params: camelcase(params.merge(addStream: stream_id)), type: Patch)
end

#change_layout(archive_id:, **params) ⇒ Response

Change the layout of a composed archive while it is being recorded.

See Also:

  • add docs link


152
153
154
# File 'lib/vonage/video/archives.rb', line 152

def change_layout(archive_id:, **params)
  request('/v2/project/' + @config.application_id + '/archive/' + archive_id + '/layout', params: camelcase(params), type: Put)
end

#delete(archive_id:) ⇒ Response

Delete a specified archive.

See Also:

  • add docs link


102
103
104
# File 'lib/vonage/video/archives.rb', line 102

def delete(archive_id:)
  request('/v2/project/' + @config.application_id + '/archive/' + archive_id, type: Delete)
end

#info(archive_id:) ⇒ Response

Return information for specified archive.

See Also:

  • add docs link


40
41
42
# File 'lib/vonage/video/archives.rb', line 40

def info(archive_id:)
  request('/v2/project/' + @config.application_id + '/archive/' + archive_id)
end

#list(**params) ⇒ ListResponse

Get a list of archives for a specified Vonage application.

TODO: add auto_advance option

See Also:

  • add docs link


28
29
30
# File 'lib/vonage/video/archives.rb', line 28

def list(**params)
  request('/v2/project/' + @config.application_id + '/archive', params: params, response_class: ListResponse)
end

#remove_stream(archive_id:, stream_id:) ⇒ Response

Remove a stream from a composed archive that was started with the streamMode set to “manual”.

See Also:

  • add docs link


134
135
136
# File 'lib/vonage/video/archives.rb', line 134

def remove_stream(archive_id:, stream_id:)
  request('/v2/project/' + @config.application_id + '/archive/' + archive_id + '/streams', params: {removeStream: stream_id}, type: Patch)
end

#start(session_id:, **params) ⇒ Response

Create a new archive.

See Also:

  • add docs link


78
79
80
# File 'lib/vonage/video/archives.rb', line 78

def start(session_id:, **params)
  request('/v2/project/' + @config.application_id + '/archive', params: camelcase(params.merge(session_id: session_id)), type: Post)
end

#stop(archive_id:) ⇒ Response

Stop recording a specified archive.

See Also:

  • add docs link


90
91
92
# File 'lib/vonage/video/archives.rb', line 90

def stop(archive_id:)
  request('/v2/project/' + @config.application_id + '/archive/' + archive_id + '/stop', type: Post)
end