bigbluebutton-api-ruby 1.9.1 → 2.0.0.pre.rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/publish-gem-on-tag-push.yml +0 -2
- data/.ruby-version +1 -1
- data/Dockerfile +6 -2
- data/Gemfile +5 -10
- data/Gemfile.lock +26 -78
- data/Rakefile +0 -22
- data/bigbluebutton-api-ruby.gemspec +3 -7
- data/features/step_definitions/check_status_steps.rb +9 -9
- data/features/step_definitions/common_steps.rb +6 -6
- data/features/step_definitions/end_meetings_steps.rb +3 -3
- data/features/step_definitions/recordings_steps.rb +4 -4
- data/lib/bigbluebutton_api.rb +4 -90
- data/spec/bigbluebutton_api_spec.rb +38 -47
- data/spec/bigbluebutton_formatter_spec.rb +5 -5
- metadata +17 -93
- data/examples/config_xml.rb +0 -74
- data/lib/bigbluebutton_config_layout.rb +0 -58
- data/lib/bigbluebutton_config_xml.rb +0 -125
- data/spec/bigbluebutton_api_0.81_spec.rb +0 -153
- data/spec/bigbluebutton_config_layout_spec.rb +0 -86
- data/spec/bigbluebutton_config_xml_spec.rb +0 -302
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73e3f2e22efb6a7e8f2be83e23828e02bef1d0decdd8f72816919394246bf258
|
4
|
+
data.tar.gz: 0767cb9303dc6b4366000deb1b99dea54e7fefee9cf2bb721a7a6970208be38d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0bf29d614bc58bff39c12bd8ebc747ff1b47e231154ebe9654a59b22dc33539271dbeffee6f8e2e413367fb3fecc3b548975b74f82f072687b69349ad04f67d
|
7
|
+
data.tar.gz: da0034f9d53e5984b596073b0f3827a6a2e8d88978c900be982ab5333bfec1c010f8cb97fb853864cb5ddb73d0265918749ed381d4ec9c50975ef64b229ae7b3
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.4.5
|
data/Dockerfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
FROM ruby:
|
1
|
+
FROM ruby:3.4.5
|
2
2
|
|
3
|
-
ENV app
|
3
|
+
ENV app=/usr/src/app
|
4
4
|
|
5
5
|
# Create app directory
|
6
6
|
RUN mkdir -p $app
|
@@ -9,5 +9,9 @@ WORKDIR $app
|
|
9
9
|
# Bundle app source
|
10
10
|
COPY . $app
|
11
11
|
|
12
|
+
# Set the app directory as safe in Git, to avoid 'detected dubious ownership in repository' errors
|
13
|
+
RUN git config --global --add safe.directory ${app}
|
14
|
+
|
12
15
|
# Install app dependencies
|
16
|
+
RUN gem install bundler -v 2.6.9
|
13
17
|
RUN bundle install
|
data/Gemfile
CHANGED
@@ -1,16 +1,11 @@
|
|
1
|
-
source '
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
|
3
|
+
ruby file: '.ruby-version'
|
4
4
|
|
5
|
-
|
6
|
-
gem 'rake', '>= 0.9'
|
7
|
-
gem 'rdoc', '3.12.1'
|
8
|
-
end
|
5
|
+
gemspec
|
9
6
|
|
10
7
|
group :development, :test do
|
11
|
-
gem 'rspec'
|
12
|
-
gem 'cucumber-rails'
|
8
|
+
gem 'rspec'
|
13
9
|
gem 'forgery'
|
14
|
-
gem '
|
15
|
-
# gem 'rails_best_practices'
|
10
|
+
gem 'rake'
|
16
11
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,97 +1,45 @@
|
|
1
|
-
GIT
|
2
|
-
remote: https://github.com/mconf/bbbot-ruby.git
|
3
|
-
revision: fcfd8c4c71371653335a46d7462ee14a9301f546
|
4
|
-
specs:
|
5
|
-
bbbot-ruby (0.0.1)
|
6
|
-
|
7
1
|
PATH
|
8
2
|
remote: .
|
9
3
|
specs:
|
10
|
-
bigbluebutton-api-ruby (
|
11
|
-
|
12
|
-
ffi (>= 1.9.24)
|
13
|
-
json (>= 1.8.6)
|
14
|
-
nokogiri (>= 1.10.4)
|
15
|
-
rack (>= 1.6.11)
|
16
|
-
rubyzip (>= 1.3.0)
|
4
|
+
bigbluebutton-api-ruby (2.0.0.pre.rc.1)
|
5
|
+
base64 (>= 0.1.0)
|
17
6
|
xml-simple (~> 1.1)
|
18
7
|
|
19
8
|
GEM
|
20
|
-
remote:
|
9
|
+
remote: https://rubygems.org/
|
21
10
|
specs:
|
22
|
-
|
23
|
-
|
24
|
-
capybara (1.1.2)
|
25
|
-
mime-types (>= 1.16)
|
26
|
-
nokogiri (>= 1.3.3)
|
27
|
-
rack (>= 1.0.0)
|
28
|
-
rack-test (>= 0.5.4)
|
29
|
-
selenium-webdriver (~> 2.0)
|
30
|
-
xpath (~> 0.1.4)
|
31
|
-
childprocess (1.0.1)
|
32
|
-
rake (< 13.0)
|
33
|
-
cucumber (1.1.9)
|
34
|
-
builder (>= 2.1.2)
|
35
|
-
diff-lcs (>= 1.1.2)
|
36
|
-
gherkin (~> 2.9.0)
|
37
|
-
json (>= 1.4.6)
|
38
|
-
term-ansicolor (>= 1.0.6)
|
39
|
-
cucumber-rails (1.3.0)
|
40
|
-
capybara (>= 1.1.2)
|
41
|
-
cucumber (>= 1.1.8)
|
42
|
-
nokogiri (>= 1.5.0)
|
43
|
-
diff-lcs (1.1.3)
|
44
|
-
ffi (1.9.24)
|
11
|
+
base64 (0.3.0)
|
12
|
+
diff-lcs (1.6.2)
|
45
13
|
forgery (0.5.0)
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
json (~> 1.4)
|
62
|
-
rexml (3.2.5)
|
63
|
-
rspec (2.10.0)
|
64
|
-
rspec-core (~> 2.10.0)
|
65
|
-
rspec-expectations (~> 2.10.0)
|
66
|
-
rspec-mocks (~> 2.10.0)
|
67
|
-
rspec-core (2.10.0)
|
68
|
-
rspec-expectations (2.10.0)
|
69
|
-
diff-lcs (~> 1.1.3)
|
70
|
-
rspec-mocks (2.10.0)
|
71
|
-
rubyzip (1.3.0)
|
72
|
-
selenium-webdriver (2.21.2)
|
73
|
-
childprocess (>= 0.2.5)
|
74
|
-
ffi (~> 1.0)
|
75
|
-
libwebsocket (~> 0.1.3)
|
76
|
-
multi_json (~> 1.0)
|
77
|
-
rubyzip
|
78
|
-
term-ansicolor (1.0.7)
|
14
|
+
rake (12.3.3)
|
15
|
+
rexml (3.4.2)
|
16
|
+
rspec (3.13.1)
|
17
|
+
rspec-core (~> 3.13.0)
|
18
|
+
rspec-expectations (~> 3.13.0)
|
19
|
+
rspec-mocks (~> 3.13.0)
|
20
|
+
rspec-core (3.13.5)
|
21
|
+
rspec-support (~> 3.13.0)
|
22
|
+
rspec-expectations (3.13.5)
|
23
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
24
|
+
rspec-support (~> 3.13.0)
|
25
|
+
rspec-mocks (3.13.5)
|
26
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
+
rspec-support (~> 3.13.0)
|
28
|
+
rspec-support (3.13.5)
|
79
29
|
xml-simple (1.1.9)
|
80
30
|
rexml
|
81
|
-
xpath (0.1.4)
|
82
|
-
nokogiri (~> 1.3)
|
83
31
|
|
84
32
|
PLATFORMS
|
85
33
|
ruby
|
86
34
|
|
87
35
|
DEPENDENCIES
|
88
|
-
bbbot-ruby!
|
89
36
|
bigbluebutton-api-ruby!
|
90
|
-
cucumber-rails
|
91
37
|
forgery
|
92
|
-
rake
|
93
|
-
|
94
|
-
|
38
|
+
rake
|
39
|
+
rspec
|
40
|
+
|
41
|
+
RUBY VERSION
|
42
|
+
ruby 3.4.5p51
|
95
43
|
|
96
44
|
BUNDLED WITH
|
97
|
-
|
45
|
+
2.6.9
|
data/Rakefile
CHANGED
@@ -2,34 +2,12 @@ require 'rubygems'
|
|
2
2
|
require 'rdoc/task'
|
3
3
|
require 'rubygems/package_task'
|
4
4
|
require 'rspec/core/rake_task'
|
5
|
-
require 'cucumber/rake/task'
|
6
5
|
|
7
6
|
desc 'Default: run tests.'
|
8
|
-
# task :default => [:spec, :cucumber]
|
9
7
|
task :default => :spec
|
10
8
|
|
11
9
|
RSpec::Core::RakeTask.new(:spec)
|
12
10
|
|
13
|
-
Cucumber::Rake::Task.new do |t|
|
14
|
-
|
15
|
-
# Disable all features that need the bot. It isn't working since BigBlueButton 0.81.
|
16
|
-
prepend = "--tags ~@need-bot"
|
17
|
-
|
18
|
-
# in jruby the class BigBlueButtonBot doesn't work (it uses fork)
|
19
|
-
if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
|
20
|
-
puts "Jruby detected, ignoring features with @need-bot"
|
21
|
-
prepend = "--tags ~@need-bot"
|
22
|
-
end
|
23
|
-
|
24
|
-
# defaults to the latest version, that runs all tests
|
25
|
-
# if set to 0.8 only, won't run tests for newer versions
|
26
|
-
if ENV["V"] == "0.8" or ENV["VERSION"] == "0.8"
|
27
|
-
t.cucumber_opts = "--format pretty --tags ~@wip --tags @version-all #{prepend}"
|
28
|
-
else
|
29
|
-
t.cucumber_opts = "--format pretty --tags ~@wip --tags @version-all,@version-081 #{prepend}"
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
11
|
RDoc::Task.new do |rdoc|
|
34
12
|
rdoc.rdoc_files.include('README.md', 'LICENSE', 'LICENSE_003', 'CHANGELOG.md', 'lib/**/*.rb')
|
35
13
|
rdoc.main = "README.md"
|
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "bigbluebutton-api-ruby"
|
5
|
-
s.version = "
|
5
|
+
s.version = "2.0.0-rc.1"
|
6
6
|
s.licenses = ["MIT"]
|
7
7
|
s.extra_rdoc_files = ["README.md", "LICENSE", "LICENSE_003", "CHANGELOG.md"]
|
8
8
|
s.summary = "BigBlueButton integration for ruby"
|
@@ -13,12 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.bindir = "bin"
|
14
14
|
s.files = `git ls-files`.split("\n")
|
15
15
|
s.require_paths = ["lib"]
|
16
|
+
s.required_ruby_version = '>= 3.2.0'
|
16
17
|
|
17
|
-
s.add_runtime_dependency('childprocess', '>= 1.0.1')
|
18
|
-
s.add_runtime_dependency('ffi', '>= 1.9.24')
|
19
|
-
s.add_runtime_dependency('json', '>= 1.8.6')
|
20
|
-
s.add_runtime_dependency('nokogiri', '>= 1.10.4')
|
21
|
-
s.add_runtime_dependency('rack', '>= 1.6.11')
|
22
|
-
s.add_runtime_dependency('rubyzip', '>= 1.3.0')
|
23
18
|
s.add_runtime_dependency('xml-simple', '~> 1.1')
|
19
|
+
s.add_runtime_dependency('base64', '>= 0.1.0')
|
24
20
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
When /^the method isMeetingRunning informs that the meeting is running$/ do
|
2
2
|
@req.response = @api.is_meeting_running?(@req.id)
|
3
|
-
@req.response.should
|
3
|
+
@req.response.should be true
|
4
4
|
end
|
5
5
|
|
6
6
|
When /^the method isMeetingRunning informs that the meeting is not running$/i do
|
7
7
|
@req.response = @api.is_meeting_running?(@req.id)
|
8
|
-
@req.response.should
|
8
|
+
@req.response.should be false
|
9
9
|
end
|
10
10
|
|
11
11
|
When /^calling the method get_meetings$/ do
|
@@ -29,8 +29,8 @@ When /^the created meeting should be listed in the response with proper informat
|
|
29
29
|
found[:attendeePW].should be_a(String)
|
30
30
|
found[:attendeePW].should_not be_empty
|
31
31
|
found[:moderatorPW].should == @req.mod_pass
|
32
|
-
found[:hasBeenForciblyEnded].should
|
33
|
-
found[:running].should
|
32
|
+
found[:hasBeenForciblyEnded].should be false
|
33
|
+
found[:running].should be false
|
34
34
|
if @api.version >= "0.8"
|
35
35
|
found[:meetingName].should == @req.id
|
36
36
|
found[:createTime].should be_a(Numeric)
|
@@ -40,8 +40,8 @@ end
|
|
40
40
|
When /^it shows all the information of the meeting that was created$/ do
|
41
41
|
@req.response = @api.get_meeting_info(@req.id, @req.mod_pass)
|
42
42
|
@req.response[:meetingID].should == @req.id
|
43
|
-
@req.response[:running].should
|
44
|
-
@req.response[:hasBeenForciblyEnded].should
|
43
|
+
@req.response[:running].should be false
|
44
|
+
@req.response[:hasBeenForciblyEnded].should be false
|
45
45
|
@req.response[:startTime].should be_nil
|
46
46
|
@req.response[:endTime].should be_nil
|
47
47
|
@req.response[:participantCount].should == 0
|
@@ -70,7 +70,7 @@ When /^it shows all the information of the meeting that was created$/ do
|
|
70
70
|
|
71
71
|
@req.opts.has_key?(:record) ?
|
72
72
|
(@req.response[:recording].should == @req.opts[:record]) :
|
73
|
-
(@req.response[:recording].should
|
73
|
+
(@req.response[:recording].should be false)
|
74
74
|
@req.opts.has_key?(:maxParticipants) ?
|
75
75
|
(@req.response[:maxUsers].should == @req.opts[:maxParticipants]) :
|
76
76
|
(@req.response[:maxUsers].should == 20)
|
@@ -98,9 +98,9 @@ Then /^it shows the (\d+) attendees in the list$/ do |count|
|
|
98
98
|
@req.response = @api.get_meeting_info(@req.id, @req.mod_pass)
|
99
99
|
participants = count.to_i
|
100
100
|
|
101
|
-
@req.response[:running].should
|
101
|
+
@req.response[:running].should be true
|
102
102
|
@req.response[:moderatorCount].should > 0
|
103
|
-
@req.response[:hasBeenForciblyEnded].should
|
103
|
+
@req.response[:hasBeenForciblyEnded].should be false
|
104
104
|
@req.response[:participantCount].should == participants
|
105
105
|
@req.response[:attendees].size.should == 2
|
106
106
|
|
@@ -57,11 +57,11 @@ When /^the response is an error with the key "(.*)"$/ do |key|
|
|
57
57
|
end
|
58
58
|
|
59
59
|
When /^the response is successful$/ do
|
60
|
-
@req.response[:returncode].should
|
60
|
+
@req.response[:returncode].should be true
|
61
61
|
end
|
62
62
|
|
63
63
|
When /^the response is successful with no messages$/ do
|
64
|
-
@req.response[:returncode].should
|
64
|
+
@req.response[:returncode].should be true
|
65
65
|
@req.response[:messageKey].should == ""
|
66
66
|
@req.response[:message].should == ""
|
67
67
|
end
|
@@ -83,9 +83,9 @@ When /^the response is successful and well formatted$/ do
|
|
83
83
|
end
|
84
84
|
|
85
85
|
When /^the response to the create method is successful and well formatted$/ do
|
86
|
-
@req.response[:returncode].should
|
86
|
+
@req.response[:returncode].should be true
|
87
87
|
@req.response[:meetingID].should == @req.id
|
88
|
-
@req.response[:hasBeenForciblyEnded].should
|
88
|
+
@req.response[:hasBeenForciblyEnded].should be false
|
89
89
|
@req.response[:messageKey].should == ""
|
90
90
|
@req.response[:message].should == ""
|
91
91
|
|
@@ -111,12 +111,12 @@ When /^the response to the create method is successful and well formatted$/ do
|
|
111
111
|
end
|
112
112
|
|
113
113
|
When /^the response to the end method is successful and well formatted$/ do
|
114
|
-
@req.response[:returncode].should
|
114
|
+
@req.response[:returncode].should be true
|
115
115
|
@req.response[:messageKey].should == "sentEndMeetingRequest"
|
116
116
|
@req.response[:message].should_not be_empty
|
117
117
|
end
|
118
118
|
|
119
119
|
When /^the response to the get_recordings method is successful and well formatted$/ do
|
120
|
-
@req.response[:returncode].should
|
120
|
+
@req.response[:returncode].should be true
|
121
121
|
@req.response[:recordings].should == []
|
122
122
|
end
|
@@ -24,7 +24,7 @@ When /^the meeting should be ended$/ do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
When /^the flag hasBeenForciblyEnded should be set$/ do
|
27
|
-
@req.response[:hasBeenForciblyEnded].should
|
27
|
+
@req.response[:hasBeenForciblyEnded].should be true
|
28
28
|
end
|
29
29
|
|
30
30
|
When /^the information returned by get_meeting_info is correct$/ do
|
@@ -32,8 +32,8 @@ When /^the information returned by get_meeting_info is correct$/ do
|
|
32
32
|
# the rest is checked in other scenarios
|
33
33
|
|
34
34
|
@req.response = @api.get_meeting_info(@req.id, @req.mod_pass)
|
35
|
-
@req.response[:running].should
|
36
|
-
@req.response[:hasBeenForciblyEnded].should
|
35
|
+
@req.response[:running].should be false
|
36
|
+
@req.response[:hasBeenForciblyEnded].should be true
|
37
37
|
@req.response[:participantCount].should == 0
|
38
38
|
@req.response[:moderatorCount].should == 0
|
39
39
|
@req.response[:attendees].should == []
|
@@ -11,8 +11,8 @@ end
|
|
11
11
|
|
12
12
|
When /^the meeting is set to be recorded$/ do
|
13
13
|
@req.response = @api.get_meeting_info(@req.id, @req.mod_pass)
|
14
|
-
@req.response[:returncode].should
|
15
|
-
@req.response[:recording].should
|
14
|
+
@req.response[:returncode].should be true
|
15
|
+
@req.response[:recording].should be true
|
16
16
|
end
|
17
17
|
|
18
18
|
When /^the user creates a meeting without the record flag$/ do
|
@@ -28,8 +28,8 @@ end
|
|
28
28
|
|
29
29
|
When /^the meeting is not set to be recorded$/i do
|
30
30
|
@req.response = @api.get_meeting_info(@req.id, @req.mod_pass)
|
31
|
-
@req.response[:returncode].should
|
32
|
-
@req.response[:recording].should
|
31
|
+
@req.response[:returncode].should be true
|
32
|
+
@req.response[:recording].should be false
|
33
33
|
end
|
34
34
|
|
35
35
|
When /^the user calls the get_recordings method$/ do
|
data/lib/bigbluebutton_api.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'net/http'
|
2
|
-
require 'cgi'
|
3
2
|
require 'rexml/document'
|
4
3
|
require 'digest/sha1'
|
5
4
|
require 'digest/sha2'
|
@@ -8,8 +7,6 @@ require 'bigbluebutton_hash_to_xml'
|
|
8
7
|
require 'bigbluebutton_exception'
|
9
8
|
require 'bigbluebutton_formatter'
|
10
9
|
require 'bigbluebutton_modules'
|
11
|
-
require 'bigbluebutton_config_xml'
|
12
|
-
require 'bigbluebutton_config_layout'
|
13
10
|
require 'logger'
|
14
11
|
|
15
12
|
module BigBlueButton
|
@@ -550,88 +547,10 @@ module BigBlueButton
|
|
550
547
|
send_api_request(:deleteRecordings, params)
|
551
548
|
end
|
552
549
|
|
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
|
-
|
605
550
|
#
|
606
551
|
# Helper functions
|
607
552
|
#
|
608
553
|
|
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
|
-
|
635
554
|
# Make a simple request to the server to test the connection.
|
636
555
|
def test_connection
|
637
556
|
response = send_api_request(:index)
|
@@ -687,15 +606,10 @@ module BigBlueButton
|
|
687
606
|
checksum_param = method.to_s + checksum_param
|
688
607
|
checksum = @sha256 ? Digest::SHA256.hexdigest(checksum_param) : Digest::SHA1.hexdigest(checksum_param)
|
689
608
|
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
url = "#{@url}/#{method}?"
|
695
|
-
url += "#{params_string}&" unless params_string.empty?
|
696
|
-
url += "checksum=#{checksum}"
|
697
|
-
return url, nil
|
698
|
-
end
|
609
|
+
url = "#{@url}/#{method}?"
|
610
|
+
url += "#{params_string}&" unless params_string.empty?
|
611
|
+
url += "checksum=#{checksum}"
|
612
|
+
return url, nil
|
699
613
|
end
|
700
614
|
|
701
615
|
# Performs an API call.
|