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".

Parameters:

  • archive_id (required, String)
  • stream_id (required, String)

    The ID of the stream to be added

  • has_audio (optional, Boolean)
  • has_video (optional, Boolean)

Returns:

See Also:

  • add docs link


116
117
118
# File 'lib/vonage/video/archives.rb', line 116

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.

Parameters:

  • archive_id (required, String)
  • type (optional, String)
  • stylesheet (optional, String)
  • screenshare_type (optional, String)

Returns:

See Also:

  • add docs link


148
149
150
# File 'lib/vonage/video/archives.rb', line 148

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.

Parameters:

  • archive_id (required, String)

Returns:

See Also:

  • add docs link


98
99
100
# File 'lib/vonage/video/archives.rb', line 98

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.

Parameters:

  • archive_id (required, String)

Returns:

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

Parameters:

  • :offset (optional, Integer)
  • :count (optional, Integer)
  • :session_id (optional, String)

Returns:

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".

Parameters:

  • archive_id (required, String)
  • stream_id (required, String)

    The ID of the stream to be removed

Returns:

See Also:

  • add docs link


130
131
132
# File 'lib/vonage/video/archives.rb', line 130

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.

Parameters:

  • :session_id (required, String)
  • :hasAudio (optional, String)
  • :hasVideo (optional, String)
  • :name (optional, String)
  • :outputMode (optional, String)
  • :resolution (optional, String)
  • :streamMode (optional, String)
  • :multiArchiveTag (optional, String)
  • :layout (optional, Hash)
  • layout (Hash)

    a customizable set of options

Returns:

See Also:

  • add docs link


74
75
76
# File 'lib/vonage/video/archives.rb', line 74

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.

Parameters:

  • archive_id (required, String)

Returns:

See Also:

  • add docs link


86
87
88
# File 'lib/vonage/video/archives.rb', line 86

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