Class: AdobeConnect::Meeting
Overview
Public: Represents a meeting in a Connect environment.
Instance Attribute Summary collapse
-
#date_begin ⇒ Object
Returns the value of attribute date_begin.
-
#date_end ⇒ Object
Returns the value of attribute date_end.
-
#description ⇒ Object
Returns the value of attribute description.
-
#folder_id ⇒ Object
Returns the value of attribute folder_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#url_path ⇒ Object
Returns the value of attribute url_path.
Attributes inherited from Base
Class Method Summary collapse
- .config ⇒ Object
- .find_by_id(sco_id, service = AdobeConnect::Service.new) ⇒ Object
- .find_by_url_path(url_path, service = AdobeConnect::Service.new) ⇒ Object
- .find_within_folder(folder_id, params = {}, service = AdobeConnect::Service.new) ⇒ Object
- .load_from_xml(ac_meeting, service) ⇒ Object private
Instance Method Summary collapse
- #add_host(principal_id) ⇒ Object
- #add_participant(principal_id) ⇒ Object
- #add_presenter(principal_id) ⇒ Object
-
#attrs ⇒ Object
meeting_options - A hash with the following keys: date_begin - (optional) Datetime that meeting begins.
- #remove_user(principal_id) ⇒ Object
Methods inherited from Base
#ac_obj_node_name, #ac_obj_type, create, #delete, #delete_method_prefix, #initialize, #method_prefix, #permissions_update, #save, #save_errors, #set_attrs, #update_attributes
Constructor Details
This class inherits a constructor from AdobeConnect::Base
Instance Attribute Details
#date_begin ⇒ Object
Returns the value of attribute date_begin.
5 6 7 |
# File 'lib/adobe_connect/meeting.rb', line 5 def date_begin @date_begin end |
#date_end ⇒ Object
Returns the value of attribute date_end.
5 6 7 |
# File 'lib/adobe_connect/meeting.rb', line 5 def date_end @date_end end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/adobe_connect/meeting.rb', line 5 def description @description end |
#folder_id ⇒ Object
Returns the value of attribute folder_id.
5 6 7 |
# File 'lib/adobe_connect/meeting.rb', line 5 def folder_id @folder_id end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/adobe_connect/meeting.rb', line 5 def name @name end |
#url_path ⇒ Object
Returns the value of attribute url_path.
5 6 7 |
# File 'lib/adobe_connect/meeting.rb', line 5 def url_path @url_path end |
Class Method Details
.config ⇒ Object
49 50 51 |
# File 'lib/adobe_connect/meeting.rb', line 49 def self.config super.merge({ :ac_obj_type => 'sco', :delete_method_is_plural => false }) end |
.find_by_id(sco_id, service = AdobeConnect::Service.new) ⇒ Object
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/adobe_connect/meeting.rb', line 53 def self.find_by_id(sco_id, service = AdobeConnect::Service.new) response = service.sco_info(sco_id: sco_id) sco_info = response.at_xpath('//sco') if !sco_info.nil? load_from_xml(sco_info, service) else nil end end |
.find_by_url_path(url_path, service = AdobeConnect::Service.new) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/adobe_connect/meeting.rb', line 64 def self.find_by_url_path(url_path, service = AdobeConnect::Service.new) response = service.sco_by_url(:url_path => url_path) ac_meeting = response.at_xpath('//sco') if !ac_meeting.nil? load_from_xml(ac_meeting, service) else nil end end |
.find_within_folder(folder_id, params = {}, service = AdobeConnect::Service.new) ⇒ Object
76 77 78 79 80 |
# File 'lib/adobe_connect/meeting.rb', line 76 def self.find_within_folder(folder_id, params = {}, service = AdobeConnect::Service.new) response = service.sco_contents( params.merge(:sco_id => folder_id, :type => 'meeting') ) ac_meetings = response.at_xpath('//scos') ac_meetings.children.map{|m| load_from_xml(m, service) } end |
.load_from_xml(ac_meeting, service) ⇒ Object (private)
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/adobe_connect/meeting.rb', line 83 def self.load_from_xml(ac_meeting, service) meeting = self.new({}, service) meeting.attrs.each do |atr,v| chld = ac_meeting.children.select{|c| c.name == atr.to_s.dasherize}[0] if !chld.nil? meeting.send(:"#{atr}=", chld.text) end end meeting.folder_id = ac_meeting.attr('folder-id') meeting.instance_variable_set(:@id, ac_meeting.attr('sco-id')) meeting end |
Instance Method Details
#add_host(principal_id) ⇒ Object
33 34 35 |
# File 'lib/adobe_connect/meeting.rb', line 33 def add_host(principal_id) (principal_id, 'host') end |
#add_participant(principal_id) ⇒ Object
41 42 43 |
# File 'lib/adobe_connect/meeting.rb', line 41 def add_participant(principal_id) (principal_id, 'view') end |
#add_presenter(principal_id) ⇒ Object
37 38 39 |
# File 'lib/adobe_connect/meeting.rb', line 37 def add_presenter(principal_id) (principal_id, 'mini-host') end |
#attrs ⇒ Object
meeting_options - A hash with the following keys:
date_begin - (optional) Datetime that meeting begins.
date_end - (optional) Datetime that meeting ends.
description - A description of the meeting to be displayed to users.
folder_id - (Required for creating) ID of the meeting folder
name - Name of the meeting
url_path - (optional) Custom url for meeting. One will be generated
by AC if not provided
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/adobe_connect/meeting.rb', line 17 def attrs atrs = {:type => 'meeting'} [ :date_end, :date_begin, :description, :name, :url_path ].each do |atr| atrs[atr] = send(atr) end if !self.id.nil? atrs.merge!(:sco_id => self.id) else atrs.merge!(:folder_id => folder_id) end atrs end |
#remove_user(principal_id) ⇒ Object
45 46 47 |
# File 'lib/adobe_connect/meeting.rb', line 45 def remove_user(principal_id) (principal_id, 'remove') end |