Class: Webex::Meeting::Action
- Inherits:
-
Object
- Object
- Webex::Meeting::Action
- Includes:
- Webex, Webex::Meeting
- Defined in:
- lib/webex/meeting/action.rb
Overview
comment
Constant Summary
Constants included from Webex::Meeting
Constants included from Webex
Instance Attribute Summary collapse
-
#app_handle ⇒ Object
Returns the value of attribute app_handle.
-
#attendee_mail ⇒ Object
Returns the value of attribute attendee_mail.
-
#attendee_name ⇒ Object
Returns the value of attribute attendee_name.
-
#back_url ⇒ Object
Returns the value of attribute back_url.
-
#cancel_mail ⇒ Object
Returns the value of attribute cancel_mail.
-
#document_location ⇒ Object
Returns the value of attribute document_location.
-
#location ⇒ Object
Returns the value of attribute location.
-
#meeting_key ⇒ Object
Returns the value of attribute meeting_key.
-
#parameter ⇒ Object
Returns the value of attribute parameter.
-
#password ⇒ Object
Returns the value of attribute password.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#registration_id ⇒ Object
Returns the value of attribute registration_id.
-
#start_feature ⇒ Object
Returns the value of attribute start_feature.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #delete ⇒ Object
- #generate_params(overwrite_params = {}) ⇒ Object
- #host ⇒ Object
-
#initialize(attributes = {}) ⇒ Action
constructor
A new instance of Action.
- #join ⇒ Object
- #list_meetings ⇒ Object
- #list_open_meetings ⇒ Object
- #schedule ⇒ Object
Methods included from Webex::Meeting
Methods included from Webex
#env_attributes!, #option_required!
Constructor Details
#initialize(attributes = {}) ⇒ Action
Returns a new instance of Action.
10 11 12 13 14 |
# File 'lib/webex/meeting/action.rb', line 10 def initialize(attributes = {}) attributes.each { |k, v| send("#{k}=", v) } env_attributes! option_required! :back_url end |
Instance Attribute Details
#app_handle ⇒ Object
Returns the value of attribute app_handle.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def app_handle @app_handle end |
#attendee_mail ⇒ Object
Returns the value of attribute attendee_mail.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def attendee_mail @attendee_mail end |
#attendee_name ⇒ Object
Returns the value of attribute attendee_name.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def attendee_name @attendee_name end |
#back_url ⇒ Object
Returns the value of attribute back_url.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def back_url @back_url end |
#cancel_mail ⇒ Object
Returns the value of attribute cancel_mail.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def cancel_mail @cancel_mail end |
#document_location ⇒ Object
Returns the value of attribute document_location.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def document_location @document_location end |
#location ⇒ Object
Returns the value of attribute location.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def location @location end |
#meeting_key ⇒ Object
Returns the value of attribute meeting_key.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def meeting_key @meeting_key end |
#parameter ⇒ Object
Returns the value of attribute parameter.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def parameter @parameter end |
#password ⇒ Object
Returns the value of attribute password.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def password @password end |
#phone ⇒ Object
Returns the value of attribute phone.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def phone @phone end |
#registration_id ⇒ Object
Returns the value of attribute registration_id.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def registration_id @registration_id end |
#start_feature ⇒ Object
Returns the value of attribute start_feature.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def start_feature @start_feature end |
#url ⇒ Object
Returns the value of attribute url.
7 8 9 |
# File 'lib/webex/meeting/action.rb', line 7 def url @url end |
Instance Method Details
#delete ⇒ Object
16 17 18 19 20 |
# File 'lib/webex/meeting/action.rb', line 16 def delete option_required! :meeting_key res = Net::HTTP.post_form post_url, generate_params(api_type: 'DM') Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }] end |
#generate_params(overwrite_params = {}) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/webex/meeting/action.rb', line 49 def generate_params(overwrite_params = {}) result = {} result[:AT] = overwrite_params[:api_type] result[:MK] = meeting_key result[:BU] = back_url # delete if result[:AT] == 'DM' result[:SM] = cancel_mail? end # host if result[:AT] == 'HM' result[:AS] = start_feature result[:AH] = app_handle result[:AL] = location result[:AP] = parameter result[:DL] = document_location result[:WL] = url end # join if result[:AT] == 'JM' result[:AN] = attendee_name result[:AE] = attendee_mail result[:CO] = phone result[:PW] = password result[:RID] = registration_id end result.delete_if { |k, v| v.nil? } end |
#host ⇒ Object
22 23 24 25 26 |
# File 'lib/webex/meeting/action.rb', line 22 def host option_required! :meeting_key res = Net::HTTP.post_form post_url, generate_params(api_type: 'HM') Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }] end |
#join ⇒ Object
28 29 30 31 32 |
# File 'lib/webex/meeting/action.rb', line 28 def join option_required! :meeting_key res = Net::HTTP.post_form post_url, generate_params(api_type: 'JM') Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }] end |
#list_meetings ⇒ Object
34 35 36 37 |
# File 'lib/webex/meeting/action.rb', line 34 def list_meetings res = Net::HTTP.post_form post_url, generate_params(api_type: 'LM') Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }] end |
#list_open_meetings ⇒ Object
39 40 41 42 |
# File 'lib/webex/meeting/action.rb', line 39 def list_open_meetings res = Net::HTTP.post_form post_url, generate_params(api_type: 'OM') Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }] end |
#schedule ⇒ Object
44 45 46 47 |
# File 'lib/webex/meeting/action.rb', line 44 def schedule res = Net::HTTP.post_form post_url, generate_params(api_type: 'SM') Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }] end |