bigbluebutton-api-ruby 0.0.11 → 0.1.0.rc1
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.
- data/.gitignore +5 -2
- data/.rvmrc +1 -1
- data/.travis.yml +6 -0
- data/CHANGELOG.rdoc +19 -8
- data/Gemfile +9 -1
- data/Gemfile.lock +62 -9
- data/LICENSE +5 -7
- data/LICENSE_003 +20 -0
- data/README.rdoc +42 -19
- data/Rakefile +31 -19
- data/bigbluebutton-api-ruby.gemspec +5 -5
- data/examples/get_version_example.rb +18 -0
- data/examples/join_example.rb +59 -0
- data/examples/overall_0.7_example.rb +92 -0
- data/examples/prepare.rb +38 -0
- data/extras/bigbluebutton_bot.rb +64 -0
- data/extras/download_bot_from.txt +1 -0
- data/extras/test-presentation.pdf +0 -0
- data/features/check_status.feature +45 -0
- data/features/config.yml.example +21 -0
- data/features/create_meetings.feature +29 -0
- data/features/end_meetings.feature +27 -0
- data/features/join_meetings.feature +29 -0
- data/features/pre_upload_slides.feature +14 -0
- data/features/recordings.feature +34 -0
- data/features/step_definitions/check_status_steps.rb +119 -0
- data/features/step_definitions/common_steps.rb +122 -0
- data/features/step_definitions/create_meetings_steps.rb +54 -0
- data/features/step_definitions/end_meetings_steps.rb +49 -0
- data/features/step_definitions/join_meetings_steps.rb +39 -0
- data/features/step_definitions/pre_upload_slides_steps.rb +13 -0
- data/features/step_definitions/recordings_steps.rb +38 -0
- data/features/support/api_tests/configs.rb +51 -0
- data/features/support/env.rb +7 -0
- data/features/support/hooks.rb +11 -0
- data/lib/bigbluebutton_api.rb +301 -97
- data/lib/bigbluebutton_formatter.rb +105 -19
- data/lib/bigbluebutton_modules.rb +92 -0
- data/lib/hash_to_xml.rb +22 -51
- data/spec/bigbluebutton_api_0.8_spec.rb +273 -0
- data/spec/bigbluebutton_api_spec.rb +211 -117
- data/spec/bigbluebutton_formatter_spec.rb +178 -29
- data/spec/bigbluebutton_modules_spec.rb +95 -0
- data/spec/data/hash_to_xml_complex.xml +45 -0
- data/spec/hash_to_xml_spec.rb +143 -0
- data/spec/spec_helper.rb +4 -2
- data/spec/support/forgery/forgeries/random_name.rb +7 -0
- data/spec/support/forgery/forgeries/url.rb +5 -0
- metadata +47 -12
- data/test/config.yml.example +0 -9
- data/test/test.rb +0 -154
data/.gitignore
CHANGED
data/.rvmrc
CHANGED
data/.travis.yml
ADDED
data/CHANGELOG.rdoc
CHANGED
@@ -1,4 +1,15 @@
|
|
1
|
-
|
1
|
+
=== 0.1.0.rc1
|
2
|
+
|
3
|
+
* Support to BigBlueButton 0.8:
|
4
|
+
* New methods for recordings: get_recordings, publish_recordings, delete_recordings
|
5
|
+
* Pre-upload of slides in create_meeting
|
6
|
+
* New parameters added in the already existent methods
|
7
|
+
* For more information see BigBlueButton docs at http://code.google.com/p/bigbluebutton/wiki/API#Version_0.8
|
8
|
+
* Method signature changes: create_meeting, join_meeting_url and join_meeting. Optional parameters are now passed using a hash.
|
9
|
+
* Integration tests for the entire library using cucumber.
|
10
|
+
* Changed the XML parser to xml-simple (especially to solve issues with CDATA values).
|
11
|
+
|
12
|
+
=== 0.0.11
|
2
13
|
|
3
14
|
* The file "bigbluebutton-api" was renamed to "bigbluebutton_api". All "require" calls must be updated.
|
4
15
|
* Splitted the library in more files (more modular) and created rspec tests for it.
|
@@ -6,7 +17,7 @@
|
|
6
17
|
* New method last_http_response to access the last HTTP response object.
|
7
18
|
* Automatically detects the BBB server version if not informed by the user.
|
8
19
|
|
9
|
-
|
20
|
+
=== 0.0.10
|
10
21
|
|
11
22
|
* Returning hash now will *always* have these 3 values: :returncode (boolean), :messageKey (string) and :message (string).
|
12
23
|
* Some values in the hash are now converted to a fixed variable type to avoid inconsistencies:
|
@@ -17,16 +28,16 @@
|
|
17
28
|
* :hasBeenForciblyEnded (boolean)
|
18
29
|
* :endTime and :startTime (DateTime or nil)
|
19
30
|
|
20
|
-
|
31
|
+
=== 0.0.9
|
21
32
|
|
22
33
|
* Simplied "attendees" part of the hash returned in get_meeting_info. Same thing done for get_meetings.
|
23
34
|
|
24
|
-
|
35
|
+
=== 0.0.8
|
25
36
|
|
26
37
|
* New method get_api_version that returns the version of the server API (>= 0.7).
|
27
38
|
* New simplified hash syntax for get_meetings. See docs for details.
|
28
39
|
|
29
|
-
|
40
|
+
=== 0.0.6
|
30
41
|
|
31
42
|
* New method test_connection.
|
32
43
|
* Added comparison method for APIs.
|
@@ -34,17 +45,17 @@
|
|
34
45
|
* Better exception throwing when the user is unreachable or the response is incorrect.
|
35
46
|
* BigBlueButtonException has now a "key" attribute to store the "messageKey" returned by BBB in failures.
|
36
47
|
|
37
|
-
|
48
|
+
=== 0.0.4
|
38
49
|
|
39
50
|
* Added support for BigBlueButton 0.7.
|
40
51
|
* Gem renamed from 'bigbluebutton' to 'bigbluebutton-api-ruby'.
|
41
52
|
* API functions now return a hash and instead of the XML returned by BBB. The XML is converted to a hash that uses symbols as keys and groups keys with the same name.
|
42
53
|
|
43
|
-
|
54
|
+
=== 0.0.3
|
44
55
|
|
45
56
|
* Fixes module issue preventing proper throwing of exceptions.
|
46
57
|
|
47
|
-
|
58
|
+
=== 0.0.1
|
48
59
|
|
49
60
|
* This is the first version of this gem. It provides an implementation of the 0.64 bbb API, with the following exceptions:
|
50
61
|
* Does not implement meeting token, and instead relies on meeting id as the unique identifier for a meeting.
|
data/Gemfile
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
|
-
|
3
|
+
gemspec
|
4
4
|
|
5
5
|
group :developement do
|
6
|
+
gem 'rake', '>= 0.9'
|
7
|
+
gem 'rdoc'
|
8
|
+
end
|
9
|
+
|
10
|
+
group :development, :test do
|
6
11
|
gem 'rspec', '~> 2.6'
|
12
|
+
gem 'cucumber-rails'
|
13
|
+
gem 'forgery'
|
14
|
+
# gem 'rails_best_practices'
|
7
15
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,20 +1,73 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
bigbluebutton-api-ruby (0.1.0.rc1)
|
5
|
+
xml-simple (>= 1.1.1)
|
6
|
+
|
1
7
|
GEM
|
2
8
|
remote: http://rubygems.org/
|
3
9
|
specs:
|
10
|
+
builder (3.0.0)
|
11
|
+
capybara (1.1.2)
|
12
|
+
mime-types (>= 1.16)
|
13
|
+
nokogiri (>= 1.3.3)
|
14
|
+
rack (>= 1.0.0)
|
15
|
+
rack-test (>= 0.5.4)
|
16
|
+
selenium-webdriver (~> 2.0)
|
17
|
+
xpath (~> 0.1.4)
|
18
|
+
childprocess (0.2.2)
|
19
|
+
ffi (~> 1.0.6)
|
20
|
+
cucumber (1.1.2)
|
21
|
+
builder (>= 2.1.2)
|
22
|
+
diff-lcs (>= 1.1.2)
|
23
|
+
gherkin (~> 2.6.2)
|
24
|
+
json (>= 1.4.6)
|
25
|
+
term-ansicolor (>= 1.0.6)
|
26
|
+
cucumber-rails (1.2.0)
|
27
|
+
capybara (>= 1.1.1)
|
28
|
+
cucumber (>= 1.1.1)
|
29
|
+
nokogiri (>= 1.5.0)
|
4
30
|
diff-lcs (1.1.3)
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
31
|
+
ffi (1.0.11)
|
32
|
+
forgery (0.5.0)
|
33
|
+
gherkin (2.6.6)
|
34
|
+
json (>= 1.4.6)
|
35
|
+
json (1.6.1)
|
36
|
+
json_pure (1.6.1)
|
37
|
+
mime-types (1.17.2)
|
38
|
+
nokogiri (1.5.0)
|
39
|
+
rack (1.3.5)
|
40
|
+
rack-test (0.6.1)
|
41
|
+
rack (>= 1.0)
|
42
|
+
rake (0.9.2.2)
|
43
|
+
rdoc (3.11)
|
44
|
+
json (~> 1.4)
|
45
|
+
rspec (2.7.0)
|
46
|
+
rspec-core (~> 2.7.0)
|
47
|
+
rspec-expectations (~> 2.7.0)
|
48
|
+
rspec-mocks (~> 2.7.0)
|
49
|
+
rspec-core (2.7.1)
|
50
|
+
rspec-expectations (2.7.0)
|
12
51
|
diff-lcs (~> 1.1.2)
|
13
|
-
rspec-mocks (2.
|
52
|
+
rspec-mocks (2.7.0)
|
53
|
+
rubyzip (0.9.4)
|
54
|
+
selenium-webdriver (2.13.0)
|
55
|
+
childprocess (>= 0.2.1)
|
56
|
+
ffi (~> 1.0.9)
|
57
|
+
json_pure
|
58
|
+
rubyzip
|
59
|
+
term-ansicolor (1.0.7)
|
60
|
+
xml-simple (1.1.1)
|
61
|
+
xpath (0.1.4)
|
62
|
+
nokogiri (~> 1.3)
|
14
63
|
|
15
64
|
PLATFORMS
|
16
65
|
ruby
|
17
66
|
|
18
67
|
DEPENDENCIES
|
19
|
-
|
68
|
+
bigbluebutton-api-ruby!
|
69
|
+
cucumber-rails
|
70
|
+
forgery
|
71
|
+
rake (>= 0.9)
|
72
|
+
rdoc
|
20
73
|
rspec (~> 2.6)
|
data/LICENSE
CHANGED
@@ -1,11 +1,4 @@
|
|
1
|
-
== bigbluebutton-api-ruby
|
2
|
-
|
3
1
|
Copyright (c) 2011 Leonardo Crauss Daronco
|
4
|
-
GT-Mconf: Multiconference system for interoperable web and mobile
|
5
|
-
* http://www.inf.ufrgs.br/prav/gtmconf
|
6
|
-
* PRAV Labs - UFRGS
|
7
|
-
|
8
|
-
Copyright (c) 2010 Joe Kinsella
|
9
2
|
|
10
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
11
4
|
this software and associated documentation files (the "Software"), to deal in
|
@@ -23,3 +16,8 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
23
16
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
24
17
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
25
18
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
19
|
+
|
20
|
+
This software is developed at:
|
21
|
+
GT-Mconf: Multiconference system for interoperable web and mobile
|
22
|
+
PRAV Labs - UFRGS - Porto Alegre - Brazil
|
23
|
+
http://www.inf.ufrgs.br/prav/gtmconf
|
data/LICENSE_003
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
== bigbluebutton
|
2
|
+
|
3
|
+
Copyright (c) 2010 Joe Kinsella
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
CHANGED
@@ -1,32 +1,55 @@
|
|
1
|
-
=
|
1
|
+
= bigbluebutton-api-ruby {<img src="http://travis-ci.org/mconf/bigbluebutton-api-ruby.png"/>}[http://travis-ci.org/mconf/bigbluebutton-api-ruby]
|
2
2
|
|
3
|
-
|
3
|
+
This is a ruby gem that provides access to the {BigBlueButton}[http://bigbluebutton.org] API.
|
4
|
+
For the API documentation see {this page}[http://code.google.com/p/bigbluebutton/wiki/API].
|
4
5
|
|
5
|
-
|
6
|
+
Basically it enables a ruby application to interact with BigBlueButton by calling ruby methods instead of HTTP requests making it a lot easier to
|
7
|
+
interact with BigBlueButton. And also formats the responses to a ruby-friendly format.
|
6
8
|
|
7
|
-
|
9
|
+
Some details:
|
8
10
|
|
9
|
-
|
11
|
+
* Provides methods to perform all API calls and get the responses;
|
12
|
+
* Converts the XML responses to ruby hashes, that are easier to work with;
|
13
|
+
* Converts the string values returned to native ruby types. For instance:
|
14
|
+
* Dates are converted DateTime objects (e.g. "Thu Sep 01 17:51:42 UTC 2011");
|
15
|
+
* Response codes are converted to boolean (e.g. "SUCCESS" becomes <tt>true</tt>);
|
16
|
+
* Deals with errors (e.g. timeouts) throwing BigBlueButtonException exceptions;
|
17
|
+
* Support to multiple BigBlueButton API versions (see below).
|
10
18
|
|
11
|
-
|
19
|
+
== Supported BigBlueButton versions
|
20
|
+
|
21
|
+
Currently supports the following versions of BigBlueButton:
|
22
|
+
|
23
|
+
* 0.8 (currently in the beta3 stage).
|
24
|
+
* 0.7 (including 0.7, 0.71 and 0.71a).
|
25
|
+
* 0.64: see the branch "api-0.64". The last version with support to 0.64 is {version 0.0.10}[https://github.com/mconf/bigbluebutton-api-ruby/tree/v0.0.10].
|
26
|
+
|
27
|
+
== Supported ruby versions
|
28
|
+
|
29
|
+
Tested in rubies:
|
30
|
+
|
31
|
+
* ruby-1.8.7
|
32
|
+
* ruby-1.9.2
|
33
|
+
* ree-1.8.7
|
34
|
+
* jruby
|
12
35
|
|
13
36
|
== Releases
|
14
37
|
|
15
|
-
|
38
|
+
For a list of releases and release notes see {CHANGELOG.rdoc}[https://github.com/mconf/bigbluebutton-api-ruby/blob/master/CHANGELOG.rdoc].
|
16
39
|
|
17
|
-
==
|
40
|
+
== Development
|
41
|
+
|
42
|
+
Information about the development of <tt>bigbluebutton-api-ruby</tt> can be found in {our wiki}[https://github.com/mconf/bigbluebutton-api-ruby/wiki].
|
43
|
+
|
44
|
+
The development of this gem is guided by the requirements of the project Mconf. To know more about it visit the {project's wiki}[http://code.google.com/p/mconf/].
|
18
45
|
|
19
|
-
|
46
|
+
== License
|
20
47
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
License:: Distributed under same terms as Ruby
|
48
|
+
Distributed under The MIT License (MIT).
|
49
|
+
See {LICENSE}[https://github.com/mconf/bigbluebutton-api-ruby/blob/master/LICENSE] for the latest license, valid for all versions after 0.0.4 (including it), and {LICENSE_003}[https://github.com/mconf/bigbluebutton-api-ruby/blob/master/LICENSE_003] for version 0.0.3 and all the previous versions.
|
50
|
+
|
51
|
+
== Contact
|
26
52
|
|
27
|
-
|
53
|
+
<b>Version 0.0.4+</b>: Leonardo Crauss Daronco (leonardodaronco@gmail.com), GT-Mconf: Multiconference system for interoperable web and mobile @ PRAV Labs - UFRGS. Home page: http://www.inf.ufrgs.br/prav/gtmconf
|
28
54
|
|
29
|
-
|
30
|
-
Email:: joe.kinsella@gmail.com
|
31
|
-
Home Page:: http://www.brownbaglunch.com/bigbluebutton
|
32
|
-
License:: Distributes under same terms as Ruby
|
55
|
+
<b>Version 0.0.3 and below</b>: Joe Kinsella (joe.kinsella@gmail.com), Home page: http://www.brownbaglunch.com/bigbluebutton
|
data/Rakefile
CHANGED
@@ -1,31 +1,43 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require '
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
require 'rake/
|
6
|
-
require 'rake/gempackagetask'
|
2
|
+
require 'rdoc/task'
|
3
|
+
require 'rubygems/package_task'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
require 'cucumber/rake/task'
|
7
6
|
|
8
7
|
desc 'Default: run tests.'
|
9
|
-
task :default => :
|
8
|
+
task :default => [:spec, :cucumber]
|
10
9
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
RSpec::Core::RakeTask.new(:spec)
|
11
|
+
|
12
|
+
Cucumber::Rake::Task.new do |t|
|
13
|
+
|
14
|
+
# in jruby the class BigBlueButtonBot doesn't work (it uses fork)
|
15
|
+
if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
|
16
|
+
puts "Jruby detected, ignoring features with @need-bot"
|
17
|
+
prepend = "--tags ~@need-bot"
|
18
|
+
end
|
19
|
+
|
20
|
+
# defaults to BBB 0.7
|
21
|
+
if ENV["V"] == "0.8"
|
22
|
+
t.cucumber_opts = "--format pretty --tags ~@wip --tags @version-all,@version-08 #{prepend}"
|
23
|
+
else
|
24
|
+
t.cucumber_opts = "--format pretty --tags ~@wip --tags @version-all,@version-07 #{prepend}"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
RDoc::Task.new do |rdoc|
|
29
|
+
rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'LICENSE_003', 'CHANGELOG.rdoc', 'lib/**/*.rb')
|
30
|
+
rdoc.main = "README.rdoc"
|
15
31
|
rdoc.title = "bigbluebutton-api-ruby Docs"
|
16
|
-
rdoc.rdoc_dir = '
|
17
|
-
rdoc.options << '--line-numbers'
|
32
|
+
rdoc.rdoc_dir = 'rdoc'
|
18
33
|
end
|
19
34
|
|
20
|
-
eval("$specification = begin; #{
|
21
|
-
|
35
|
+
eval("$specification = begin; #{IO.read('bigbluebutton-api-ruby.gemspec')}; end")
|
36
|
+
Gem::PackageTask.new $specification do |pkg|
|
22
37
|
pkg.need_tar = true
|
23
38
|
pkg.need_zip = true
|
24
39
|
end
|
25
40
|
|
26
|
-
|
27
|
-
|
28
|
-
t.pattern = 'test/**/*test.rb'
|
29
|
-
t.verbose = true
|
30
|
-
t.libs << 'test'
|
41
|
+
task :notes do
|
42
|
+
puts `grep -r 'OPTIMIZE\\|FIXME\\|TODO' lib/ spec/ features/`
|
31
43
|
end
|
@@ -2,16 +2,16 @@ $:.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 = '0.0.
|
6
|
-
s.extra_rdoc_files = ['README.rdoc', 'LICENSE', 'CHANGELOG.rdoc']
|
5
|
+
s.version = '0.1.0.rc1'
|
6
|
+
s.extra_rdoc_files = ['README.rdoc', 'LICENSE', 'LICENSE_003', 'CHANGELOG.rdoc']
|
7
7
|
s.summary = 'Provides an interface to the BigBlueButton web meeting API (https://github.com/mconf/bigbluebutton-api-ruby)'
|
8
8
|
s.description = s.summary
|
9
9
|
s.authors = ['Leonardo Crauss Daronco', 'Joe Kinsella']
|
10
10
|
s.email = ['leonardodaronco@gmail.com', 'joe.kinsella@gmail.com']
|
11
11
|
s.homepage = "https://github.com/mconf/bigbluebutton-api-ruby/"
|
12
12
|
s.bindir = "bin"
|
13
|
-
s.files
|
13
|
+
s.files = `git ls-files`.split("\n")
|
14
14
|
s.require_paths = ["lib"]
|
15
15
|
|
16
|
-
s.add_runtime_dependency('
|
17
|
-
end
|
16
|
+
s.add_runtime_dependency('xml-simple', '>= 1.1.1')
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
$:.unshift File.expand_path(File.dirname(__FILE__))
|
2
|
+
$:.unshift File.join(File.expand_path(File.dirname(__FILE__)), '..', 'lib')
|
3
|
+
|
4
|
+
require 'bigbluebutton_api'
|
5
|
+
require 'prepare'
|
6
|
+
|
7
|
+
begin
|
8
|
+
prepare
|
9
|
+
|
10
|
+
@api = BigBlueButton::BigBlueButtonApi.new(@config['bbb_url'], @config['bbb_salt'], nil, true)
|
11
|
+
|
12
|
+
puts
|
13
|
+
puts "---------------------------------------------------"
|
14
|
+
puts "The version of your BBB server is: #{@api.version}"
|
15
|
+
rescue Exception => ex
|
16
|
+
puts "Failed with error #{ex.message}"
|
17
|
+
puts ex.backtrace
|
18
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
$:.unshift File.expand_path(File.dirname(__FILE__))
|
2
|
+
$:.unshift File.join(File.expand_path(File.dirname(__FILE__)), '..', 'lib')
|
3
|
+
|
4
|
+
require 'bigbluebutton_api'
|
5
|
+
require 'prepare'
|
6
|
+
|
7
|
+
begin
|
8
|
+
prepare
|
9
|
+
|
10
|
+
meeting_name = "Test Meeting"
|
11
|
+
meeting_id = "test-meeting"
|
12
|
+
moderator_name = "House"
|
13
|
+
attendee_name = "Cameron"
|
14
|
+
unless @api.is_meeting_running?(meeting_id)
|
15
|
+
puts "---------------------------------------------------"
|
16
|
+
options = { :moderatorPW => "54321",
|
17
|
+
:attendeePW => "12345",
|
18
|
+
:welcome => 'Welcome to my meeting',
|
19
|
+
:dialNumber => '1-800-000-0000x00000#',
|
20
|
+
:logoutURL => 'https://github.com/mconf/bigbluebutton-api-ruby',
|
21
|
+
:maxParticipants => 25 }
|
22
|
+
@api.create_meeting(meeting_name, meeting_id, options)
|
23
|
+
puts "The meeting has been created. Please open a web browser and enter the meeting using either of the URLs below."
|
24
|
+
|
25
|
+
puts
|
26
|
+
puts "---------------------------------------------------"
|
27
|
+
url = @api.join_meeting_url(meeting_id, moderator_name, options[:moderatorPW])
|
28
|
+
puts "1) Moderator URL = #{url}"
|
29
|
+
|
30
|
+
puts
|
31
|
+
puts "---------------------------------------------------"
|
32
|
+
puts "Waiting 30 seconds for you to enter via browser"
|
33
|
+
sleep(30)
|
34
|
+
end
|
35
|
+
|
36
|
+
unless @api.is_meeting_running?(meeting_id)
|
37
|
+
puts "You have NOT entered the meeting"
|
38
|
+
Kernel.exit!
|
39
|
+
end
|
40
|
+
puts "You have successfully entered the meeting"
|
41
|
+
|
42
|
+
puts
|
43
|
+
puts "---------------------------------------------------"
|
44
|
+
response = @api.get_meeting_info(meeting_id, options[:moderatorPW])
|
45
|
+
puts "Meeting info:"
|
46
|
+
puts response.inspect
|
47
|
+
|
48
|
+
puts
|
49
|
+
puts
|
50
|
+
puts
|
51
|
+
puts "---------------------------------------------------"
|
52
|
+
response = @api.join_meeting(meeting_id, attendee_name, options[:attendeePW])
|
53
|
+
puts "Join meeting response:"
|
54
|
+
puts response.inspect
|
55
|
+
|
56
|
+
rescue Exception => ex
|
57
|
+
puts "Failed with error #{ex.message}"
|
58
|
+
puts ex.backtrace
|
59
|
+
end
|