Skip to content

Commit 33a0cca

Browse files
authored
Merge branch 'master' into dependabot/bundler/nokogiri-1.14.3
2 parents 388cf17 + eb5a91f commit 33a0cca

9 files changed

Lines changed: 5 additions & 897 deletions

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ GEM
5555
mini_portile2 (~> 2.8.0)
5656
racc (~> 1.4)
5757
racc (1.6.2)
58-
rack (1.6.11)
58+
rack (2.2.3)
5959
rack-test (0.6.1)
6060
rack (>= 1.0)
6161
rake (0.9.2.2)

examples/config_xml.rb

Lines changed: 0 additions & 74 deletions
This file was deleted.

lib/bigbluebutton_api.rb

Lines changed: 4 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
require 'bigbluebutton_exception'
99
require 'bigbluebutton_formatter'
1010
require 'bigbluebutton_modules'
11-
require 'bigbluebutton_config_xml'
12-
require 'bigbluebutton_config_layout'
1311
require 'logger'
1412

1513
module BigBlueButton
@@ -550,88 +548,10 @@ def delete_recordings(recordIDs, options={})
550548
send_api_request(:deleteRecordings, params)
551549
end
552550

553-
554-
#
555-
# API calls since 0.81
556-
#
557-
558-
# Retrieves the default config.xml file from the server.
559-
# Returns the XML as a string by default, but if `asObject` is set to true, returns the XML
560-
# parsed as an XmlSimple object ().
561-
# asObject (Hash):: If true, returns the XML parsed as an XmlSimple object, using:
562-
# data = XmlSimple.xml_in(response, { 'ForceArray' => false, 'KeepRoot' => true })
563-
# You can then parse it back into an XML string using:
564-
# XmlSimple.xml_out(data, { 'RootName' => nil, 'XmlDeclaration' => true })
565-
# If set to false, returns the XML as a string.
566-
# options (Hash):: Hash with additional parameters. This method doesn't accept additional
567-
# parameters, but if you have a custom API with more parameters, you
568-
# can simply pass them in this hash and they will be added to the API call.
569-
def get_default_config_xml(asObject=false, options={})
570-
response = send_api_request(:getDefaultConfigXML, options, nil, true)
571-
if asObject
572-
XmlSimple.xml_in(response, { 'ForceArray' => false, 'KeepRoot' => true })
573-
else
574-
response
575-
end
576-
end
577-
578-
# Sets a config.xml file in the server.
579-
# Returns the token returned by the server (that can be later used in a 'join' call) in case
580-
# of success.
581-
# meeting_id (string):: The ID of the meeting where this config.xml will be used.
582-
# xml (string|BigBlueButtonConfigXml):: The XML that should be sent as a config.xml.
583-
# It will usually be an edited output of the default config.xml:
584-
# xml = api.get_default_config_xml
585-
# Or you can use directly a BigBlueButtonConfigXml object:
586-
# BigBlueButtonConfigXml.new(xml)
587-
# options (Hash):: Hash with additional parameters. This method doesn't accept additional
588-
# parameters, but if you have a custom API with more parameters, you
589-
# can simply pass them in this hash and they will be added to the API call.
590-
# TODO: Right now we are sending the configXML parameters in the URL and in the body of the POST
591-
# request. It works if left only in the URL, but the documentation of the API claims that it has
592-
# to be in the body of the request. So it's no clear yet and this might change in the future.
593-
def set_config_xml(meeting_id, xml, options={})
594-
if xml.instance_of?(BigBlueButton::BigBlueButtonConfigXml)
595-
data = xml.as_string
596-
else
597-
data = xml
598-
end
599-
params = { :meetingID => meeting_id, :configXML => data }.merge(options)
600-
response = send_api_request(:setConfigXML, params, data)
601-
response[:configToken]
602-
end
603-
604-
605551
#
606552
# Helper functions
607553
#
608554

609-
# Returns an array with the name of all layouts available in the server.
610-
# Will fetch the config.xml file (unless passed in the arguments), fetch the
611-
# layout definition file, and return the layouts.
612-
# If something goes wrong, returns nil. Otherwise returns the list of layout
613-
# names or an empty array if there's no layout defined.
614-
def get_available_layouts(config_xml=nil)
615-
config_xml = get_default_config_xml if config_xml.nil?
616-
config_xml = BigBlueButton::BigBlueButtonConfigXml.new(config_xml)
617-
layout_config = config_xml.get_attribute("LayoutModule", "layoutConfig", true)
618-
unless layout_config.nil?
619-
response = send_request(layout_config)
620-
layout_config = BigBlueButton::BigBlueButtonConfigLayout.new(response.body)
621-
layout_config.get_available_layouts
622-
else
623-
nil
624-
end
625-
end
626-
627-
# Returns an array with the layouts that exist by default in a BigBlueButton
628-
# server. If you want to query the server to get a real list of layouts, use
629-
# <tt>get_available_layouts</tt>.
630-
def get_default_layouts
631-
# this is the list for BigBlueButton 0.81
632-
["Default", "Video Chat", "Meeting", "Webinar", "Lecture assistant", "Lecture"]
633-
end
634-
635555
# Make a simple request to the server to test the connection.
636556
def test_connection
637557
response = send_api_request(:index)
@@ -687,15 +607,10 @@ def get_url(method, params={})
687607
checksum_param = method.to_s + checksum_param
688608
checksum = @sha256 ? Digest::SHA256.hexdigest(checksum_param) : Digest::SHA1.hexdigest(checksum_param)
689609

690-
if method == :setConfigXML
691-
params_string = "checksum=#{checksum}&#{params_string}"
692-
return "#{@url}/#{method}", params_string
693-
else
694-
url = "#{@url}/#{method}?"
695-
url += "#{params_string}&" unless params_string.empty?
696-
url += "checksum=#{checksum}"
697-
return url, nil
698-
end
610+
url = "#{@url}/#{method}?"
611+
url += "#{params_string}&" unless params_string.empty?
612+
url += "checksum=#{checksum}"
613+
return url, nil
699614
end
700615

701616
# Performs an API call.

lib/bigbluebutton_config_layout.rb

Lines changed: 0 additions & 58 deletions
This file was deleted.

lib/bigbluebutton_config_xml.rb

Lines changed: 0 additions & 125 deletions
This file was deleted.

0 commit comments

Comments
 (0)