class Plivo::Resources::ConferenceInterface

Public Class Methods

new(client, resource_list_json = nil) click to toggle source
Calls superclass method Plivo::Base::ResourceInterface::new
# File lib/plivo/resources/conferences.rb, line 214
def initialize(client, resource_list_json = nil)
  @_name = 'Conference'
  @_resource_type = Conference
  @_identifier_string = 'conference_name'
  super
  @_is_voice_request = true
end

Public Instance Methods

deaf_member(conference_name, member_id) click to toggle source

@param [String] conference_name @param [Array] member_id

# File lib/plivo/resources/conferences.rb, line 321
def deaf_member(conference_name, member_id)
  valid_param?(:conference_name, conference_name, [String, Symbol], true)
  Conference.new(@_client, resource_id: conference_name)
            .deaf_member(member_id)
end
delete(conference_name) click to toggle source
# File lib/plivo/resources/conferences.rb, line 243
def delete(conference_name)
  valid_param?(:conference_name, conference_name, [String, Symbol], true)
  if conference_name.empty?
    raise_invalid_request('Invalid conference_name passed')
  end
  Conference.new(@_client, resource_id: conference_name).delete
end
delete_all() click to toggle source
# File lib/plivo/resources/conferences.rb, line 239
def delete_all
  Conference.new(@_client, resource_id: '').delete
end
delete_member(conference_name, member_id) click to toggle source

@param [String] conference_name @param [String] member_id

# File lib/plivo/resources/conferences.rb, line 253
def delete_member(conference_name, member_id)
  valid_param?(:conference_name, conference_name, [String, Symbol], true)
  Conference.new(@_client, resource_id: conference_name)
            .delete_member(member_id)
end
each() { |conference| ... } click to toggle source
# File lib/plivo/resources/conferences.rb, line 234
def each
  conference_list = list
  conference_list[:conferences].each { |conference| yield conference }
end
get(conference_name) click to toggle source
# File lib/plivo/resources/conferences.rb, line 222
def get(conference_name)
  perform_get(conference_name)
end
kick_member(conference_name, member_id) click to toggle source

@param [String] conference_name @param [String] member_id

# File lib/plivo/resources/conferences.rb, line 261
def kick_member(conference_name, member_id)
  valid_param?(:conference_name, conference_name, [String, Symbol], true)
  Conference.new(@_client, resource_id: conference_name)
            .kick_member(member_id)
end
list() click to toggle source
# File lib/plivo/resources/conferences.rb, line 226
def list
  perform_list_without_object
  {
    api_id: @api_id,
    conferences: @conferences
  }
end
mute_member(conference_name, member_id) click to toggle source

@param [String] conference_name @param [Array] member_id

# File lib/plivo/resources/conferences.rb, line 269
def mute_member(conference_name, member_id)
  valid_param?(:conference_name, conference_name, [String, Symbol], true)
  Conference.new(@_client, resource_id: conference_name)
            .mute_member(member_id)
end
play_member(conference_name, member_id, url) click to toggle source

@param [String] conference_name @param [Array] member_id

# File lib/plivo/resources/conferences.rb, line 285
def play_member(conference_name, member_id, url)
  valid_param?(:conference_name, conference_name, [String, Symbol], true)
  Conference.new(@_client, resource_id: conference_name)
            .play_member(member_id, url)
end
record(conference_name, options = nil) click to toggle source

@param [String] conference_name @param [Hash] options @option options [String] :file_format The file format of the record can be of mp3 or wav format. Defaults to mp3 format. @option options [String] :transcription_type The type of transcription required. The following values are allowed:

- auto - This is the default value. Transcription is completely automated; turnaround time is about 5 minutes.
- hybrid - Transcription is a combination of automated and human verification processes; turnaround time is about 10-15 minutes.

@option options [String] :transcription_url The URL where the transcription is available. @option options [String] :transcription_method The method used to invoke the transcription_url. Defaults to POST. @option options [String] :callback_url The URL invoked by the API when the recording ends. The following parameters are sent to the callback_url:

- api_id - the same API ID returned by the conference record API.
- record_url - the URL to access the recorded file.
- recording_id - recording ID of the recorded file.
- conference_name - the conference name recorded.
- recording_duration - duration in seconds of the recording.
- recording_duration_ms - duration in milliseconds of the recording.
- recording_start_ms - when the recording started (epoch time UTC) in milliseconds.
- recording_end_ms - when the recording ended (epoch time UTC) in milliseconds.

@option options [String] :callback_method The method which is used to invoke the callback_url URL. Defaults to POST.

# File lib/plivo/resources/conferences.rb, line 353
def record(conference_name, options = nil)
  valid_param?(:conference_name, conference_name, [String, Symbol], true)
  Conference.new(@_client, resource_id: conference_name)
            .record(options)
end
speak_member(conference_name, member_id, text, options = nil) click to toggle source

@param [String] conference_name @param [Array] member_id @param [String] text - The text that the member must hear. @param [Hash] options @option options [String] :voice - The voice to be used. Can be MAN or WOMAN. Defaults to WOMAN. @option options [String] :language - The language to be used, see Supported voices and languages {www.plivo.com/docs/api/conference/member/#supported-voice-and-languages}. Defaults to en-US .

# File lib/plivo/resources/conferences.rb, line 305
def speak_member(conference_name, member_id, text, options = nil)
  valid_param?(:conference_name, conference_name, [String, Symbol], true)
  Conference.new(@_client, resource_id: conference_name)
            .speak_member(member_id, text, options)
end
stop_play_member(conference_name, member_id) click to toggle source

@param [String] conference_name @param [Array] member_id

# File lib/plivo/resources/conferences.rb, line 293
def stop_play_member(conference_name, member_id)
  valid_param?(:conference_name, conference_name, [String, Symbol], true)
  Conference.new(@_client, resource_id: conference_name)
            .stop_play_member(member_id)
end
stop_record(conference_name) click to toggle source

@param [String] conference_name

# File lib/plivo/resources/conferences.rb, line 360
def stop_record(conference_name)
  valid_param?(:conference_name, conference_name, [String, Symbol], true)
  Conference.new(@_client, resource_id: conference_name)
            .stop_record
end
stop_speak_member(conference_name, member_id) click to toggle source

@param [String] conference_name @param [Array] member_id

# File lib/plivo/resources/conferences.rb, line 313
def stop_speak_member(conference_name, member_id)
  valid_param?(:conference_name, conference_name, [String, Symbol], true)
  Conference.new(@_client, resource_id: conference_name)
            .stop_speak_member(member_id)
end
undeaf_member(conference_name, member_id) click to toggle source

@param [String] conference_name @param [Array] member_id

# File lib/plivo/resources/conferences.rb, line 329
def undeaf_member(conference_name, member_id)
  valid_param?(:conference_name, conference_name, [String, Symbol], true)
  Conference.new(@_client, resource_id: conference_name)
            .undeaf_member(member_id)
end
unmute_member(conference_name, member_id) click to toggle source

@param [String] conference_name @param [Array] member_id

# File lib/plivo/resources/conferences.rb, line 277
def unmute_member(conference_name, member_id)
  valid_param?(:conference_name, conference_name, [String, Symbol], true)
  Conference.new(@_client, resource_id: conference_name)
            .unmute_member(member_id)
end