class WebexXmlApi::Meeting::GetMeeting
The GetMeeting
Class queries WebEx API Service for given meeting_key
and returns the meeting details.
Constants
- PARAMETER_MAPPING
The
meeting_key
is required parameter for this service- REQUEST_TYPE
XML Request Type for the
WebexXmlApi::Meeting::GetMeeting
service
Attributes
Accessor methods for meeting_key
property and security_context
object
Reader methods for request and response objects
Reader methods for request and response objects
Accessor methods for meeting_key
property and security_context
object
Public Class Methods
The initialize
method for newly created instance parsing provided parameters (if any). The initialize
method automaticaly creates new SecurityContext
instance and passes the attribes.
# File lib/webex_xml_api/meeting/get_meeting.rb, line 32 def initialize(attributes = {}) attributes.each_pair do |k, v| send("#{k}=", v) if PARAMETER_MAPPING.key?(k) end @security_context ||= WebexXmlApi::SecurityContext.new(attributes) end
Public Instance Methods
The send_request
method will issue the XML API request to WebEx, parse the results and return data if successful. Upon failure an exception is raised.
# File lib/webex_xml_api/meeting/get_meeting.rb, line 68 def send_request @request = to_xml @response = post_webex_request(security_context.site_name, @request) check_response_and_return_data(@response) end
The to_xml
method returns XML representation of the WebexXmlApi::Meeting::GetMeeting
instance as understood by the WebEx XML Service.
# File lib/webex_xml_api/meeting/get_meeting.rb, line 44 def to_xml raise WebexXmlApi::NotEnoughArguments, 'Meeting::GetMeeting' unless valid? body_content = {} PARAMETER_MAPPING.each_pair do |k, v| body_content[v] = send(k) if send(k) end create_xml_request(@security_context.to_xml, REQUEST_TYPE, body_content) end
Returns true if required parameters provided, otherwise false.
# File lib/webex_xml_api/meeting/get_meeting.rb, line 58 def valid?(context = self) return false if context.meeting_key.nil? true end