bigbluebutton-api-ruby 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,92 +1,71 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bigbluebutton-api-ruby
3
- version: !ruby/object:Gem::Version
4
- hash: 23
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.6
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 4
10
- version: 0.0.4
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Leonardo Crauss Daronco
9
+ - Joe Kinsella
14
10
  autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
-
18
- date: 2011-02-08 00:00:00 -02:00
19
- default_executable:
20
- dependencies: []
21
-
13
+ date: 2011-04-05 00:00:00.000000000Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: nokogiri
17
+ requirement: &83620660 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 1.4.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *83620660
22
26
  description: Provides an interface to the BigBlueButton web meeting API (https://github.com/mconf/bigbluebutton-api-ruby)
23
- email: leonardodaronco@gmail.com
27
+ email:
28
+ - leonardodaronco@gmail.com
29
+ - joe.kinsella@gmail.com
24
30
  executables: []
25
-
26
31
  extensions: []
27
-
28
- extra_rdoc_files:
29
- - README
32
+ extra_rdoc_files:
33
+ - README.rdoc
30
34
  - LICENSE
31
- files:
35
+ - CHANGELOG.rdoc
36
+ files:
37
+ - .gitignore
38
+ - CHANGELOG.rdoc
32
39
  - LICENSE
33
- - README
40
+ - README.rdoc
34
41
  - Rakefile
35
- - lib/hash_to_xml.rb
36
- - lib/hash_to_xml.rb~
42
+ - bigbluebutton-api-ruby.gemspec
37
43
  - lib/bigbluebutton-api.rb
38
- - doc/files/lib/hash_to_xml_rb.html
39
- - doc/files/lib/bigbluebutton-api_rb.html
40
- - doc/files/README.html
41
- - doc/files/LICENSE.html
42
- - doc/index.html
43
- - doc/fr_file_index.html
44
- - doc/fr_class_index.html
45
- - doc/classes/Hash.html
46
- - doc/classes/BigBlueButton.html
47
- - doc/classes/BigBlueButton/BigBlueButtonException.html
48
- - doc/classes/BigBlueButton/BigBlueButtonApi.html
49
- - doc/rdoc-style.css
50
- - doc/created.rid
51
- - doc/fr_method_index.html
52
- - test/config.yml~
53
- - test/test.rb
54
- - test/config.yml.example~
44
+ - lib/hash_to_xml.rb
55
45
  - test/config.yml.example
56
- - test/config.yml
57
- has_rdoc: true
46
+ - test/test.rb
58
47
  homepage: https://github.com/mconf/bigbluebutton-api-ruby/
59
48
  licenses: []
60
-
61
49
  post_install_message:
62
50
  rdoc_options: []
63
-
64
- require_paths:
51
+ require_paths:
65
52
  - lib
66
- required_ruby_version: !ruby/object:Gem::Requirement
53
+ required_ruby_version: !ruby/object:Gem::Requirement
67
54
  none: false
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- hash: 3
72
- segments:
73
- - 0
74
- version: "0"
75
- required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ! '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
60
  none: false
77
- requirements:
78
- - - ">="
79
- - !ruby/object:Gem::Version
80
- hash: 3
81
- segments:
82
- - 0
83
- version: "0"
61
+ requirements:
62
+ - - ! '>='
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
84
65
  requirements: []
85
-
86
66
  rubyforge_project:
87
- rubygems_version: 1.4.2
67
+ rubygems_version: 1.7.1
88
68
  signing_key:
89
69
  specification_version: 3
90
70
  summary: Provides an interface to the BigBlueButton web meeting API (https://github.com/mconf/bigbluebutton-api-ruby)
91
71
  test_files: []
92
-
data/README DELETED
@@ -1,41 +0,0 @@
1
- = Project: bigbluebutton-api-ruby
2
-
3
- == Goal
4
-
5
- Provide access to the BigBlueButton web conferencing API.
6
-
7
- == Releases
8
-
9
- === Version 0.0.4
10
- Gem renamed from 'bigbluebutton' to 'bigbluebutton-api-ruby'.
11
-
12
- First version with support also to BBB API version 0.7.
13
-
14
- Changes:
15
-
16
- - 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.
17
-
18
- === Version 0.0.3
19
- Fixes module issue preventing proper throwing of exceptions.
20
-
21
- === Version 0.0.1
22
- This is the first version of this gem. It provides an implementation of the 0.64 bbb API, with the following exceptions:
23
-
24
- - Does not implement meeting token, and instead relies on meeting id as the unique identifier for a meeting.
25
- - Documentation suggests there is way to call join_meeting as API call (instead of browser URL). This call currently does not work as documented.
26
-
27
- == Contact
28
-
29
- === Version 0.0.4+
30
-
31
- Author:: Leonardo Crauss Daronco
32
- Email:: leonardodaronco@gmail.com
33
- Home Page:: http://www.inf.ufrgs.br/prav/gtmconf/
34
- License:: Distributed under same terms as Ruby
35
-
36
- === Version 0.0.3 and below
37
-
38
- Author:: Joe Kinsella
39
- Email:: joe.kinsella@gmail.com
40
- Home Page:: http://www.brownbaglunch.com/bigbluebutton
41
- License:: Distributes under same terms as Ruby
@@ -1,112 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: BigBlueButton</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">BigBlueButton</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/bigbluebutton-api_rb.html">
59
- lib/bigbluebutton-api.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
-
76
-
77
- </div>
78
-
79
-
80
- </div>
81
-
82
-
83
- <!-- if includes -->
84
-
85
- <div id="section">
86
-
87
- <div id="class-list">
88
- <h3 class="section-bar">Classes and Modules</h3>
89
-
90
- Class <a href="BigBlueButton/BigBlueButtonApi.html" class="link">BigBlueButton::BigBlueButtonApi</a><br />
91
- Class <a href="BigBlueButton/BigBlueButtonException.html" class="link">BigBlueButton::BigBlueButtonException</a><br />
92
-
93
- </div>
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
- <!-- if method_list -->
102
-
103
-
104
- </div>
105
-
106
-
107
- <div id="validator-badges">
108
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
109
- </div>
110
-
111
- </body>
112
- </html>
@@ -1,657 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: BigBlueButton::BigBlueButtonApi</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">BigBlueButton::BigBlueButtonApi</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/bigbluebutton-api_rb.html">
59
- lib/bigbluebutton-api.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- This class provides access to the <a
84
- href="../BigBlueButton.html">BigBlueButton</a> API. <a
85
- href="../BigBlueButton.html">BigBlueButton</a> is an open source project
86
- that provides web conferencing for distance education (<a
87
- href="http://code.google.com/p/bigbluebutton/wiki/API">code.google.com/p/bigbluebutton/wiki/API</a>).
88
- This API was developed to support the following version of bbb: 0.64, 0.7
89
- </p>
90
- <p>
91
- Sample usage of the API is as follows: 1) Create a meeting with the <a
92
- href="BigBlueButtonApi.html#M000008">create_meeting</a> call 2) Direct a
93
- user to either <a href="BigBlueButtonApi.html#M000006">moderator_url</a> or
94
- <a href="BigBlueButtonApi.html#M000007">attendee_url</a> 3) To force
95
- meeting to end, call <a
96
- href="BigBlueButtonApi.html#M000009">end_meeting</a>
97
- </p>
98
- <p>
99
- 0.0.4+:
100
- </p>
101
- <table>
102
- <tr><td valign="top">Author:</td><td>Leonardo Crauss Daronco (<a
103
- href="mailto:leonardodaronco@gmail.com">leonardodaronco@gmail.com</a>)
104
-
105
- </td></tr>
106
- <tr><td valign="top">Copyright:</td><td>Copyright (c) 2011 Leonardo Crauss Daronco
107
-
108
- </td></tr>
109
- <tr><td valign="top">License:</td><td>Distributes under same terms as Ruby
110
-
111
- </td></tr>
112
- </table>
113
- <p>
114
- 0.0.3 and below:
115
- </p>
116
- <table>
117
- <tr><td valign="top">Author:</td><td>Joe Kinsella (<a
118
- href="mailto:joe.kinsella@gmail.com">joe.kinsella@gmail.com</a>)
119
-
120
- </td></tr>
121
- <tr><td valign="top">Copyright:</td><td>Copyright (c) 2010 Joe Kinsella
122
-
123
- </td></tr>
124
- <tr><td valign="top">License:</td><td>Distributes under same terms as Ruby
125
-
126
- </td></tr>
127
- </table>
128
- <p>
129
- TODO: api version returned on index - added in 0.7
130
- </p>
131
-
132
- </div>
133
-
134
-
135
- </div>
136
-
137
- <div id="method-list">
138
- <h3 class="section-bar">Methods</h3>
139
-
140
- <div class="name-list">
141
- <a href="#M000007">attendee_url</a>&nbsp;&nbsp;
142
- <a href="#M000008">create_meeting</a>&nbsp;&nbsp;
143
- <a href="#M000009">end_meeting</a>&nbsp;&nbsp;
144
- <a href="#M000012">get_meeting_info</a>&nbsp;&nbsp;
145
- <a href="#M000013">get_meetings</a>&nbsp;&nbsp;
146
- <a href="#M000014">get_url</a>&nbsp;&nbsp;
147
- <a href="#M000010">is_meeting_running?</a>&nbsp;&nbsp;
148
- <a href="#M000011">join_meeting</a>&nbsp;&nbsp;
149
- <a href="#M000006">moderator_url</a>&nbsp;&nbsp;
150
- <a href="#M000005">new</a>&nbsp;&nbsp;
151
- <a href="#M000015">send_api_request</a>&nbsp;&nbsp;
152
- </div>
153
- </div>
154
-
155
- </div>
156
-
157
-
158
- <!-- if includes -->
159
-
160
- <div id="section">
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
- <!-- if method_list -->
170
- <div id="methods">
171
- <h3 class="section-bar">Public Class methods</h3>
172
-
173
- <div id="method-M000005" class="method-detail">
174
- <a name="M000005"></a>
175
-
176
- <div class="method-heading">
177
- <a href="#M000005" class="method-signature">
178
- <span class="method-name">new</span><span class="method-args">(base_url, salt, version='0.7', debug=false)</span>
179
- </a>
180
- </div>
181
-
182
- <div class="method-description">
183
- <p>
184
- Initializes an instance
185
- </p>
186
- <table>
187
- <tr><td valign="top">base_url:</td><td>URL to a <a href="../BigBlueButton.html">BigBlueButton</a> server (e.g. <a
188
- href="http://demo.bigbluebutton.org/bigbluebutton/api">demo.bigbluebutton.org/bigbluebutton/api</a>)
189
-
190
- </td></tr>
191
- <tr><td valign="top">salt:</td><td>Secret salt for this server
192
-
193
- </td></tr>
194
- <tr><td valign="top">version:</td><td>API version: 0.64 or 0.7
195
-
196
- </td></tr>
197
- </table>
198
- <p><a class="source-toggle" href="#"
199
- onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
200
- <div class="method-source-code" id="M000005-source">
201
- <pre>
202
- <span class="ruby-comment cmt"># File lib/bigbluebutton-api.rb, line 43</span>
203
- 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base_url</span>, <span class="ruby-identifier">salt</span>, <span class="ruby-identifier">version</span>=<span class="ruby-value str">'0.7'</span>, <span class="ruby-identifier">debug</span>=<span class="ruby-keyword kw">false</span>)
204
- 44: <span class="ruby-ivar">@supported_versions</span> = [<span class="ruby-value str">'0.7'</span>, <span class="ruby-value str">'0.64'</span>]
205
- 45: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@supported_versions</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">version</span>)
206
- 46: <span class="ruby-identifier">raise</span> <span class="ruby-constant">BigBlueButtonException</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;BigBlueButton error: Invalid API version #{version}. Supported versions: #{@supported_versions.join(', ')}&quot;</span>)
207
- 47: <span class="ruby-keyword kw">end</span>
208
- 48: <span class="ruby-ivar">@session</span> = {}
209
- 49: <span class="ruby-ivar">@base_url</span> = <span class="ruby-identifier">base_url</span>
210
- 50: <span class="ruby-ivar">@salt</span> = <span class="ruby-identifier">salt</span>
211
- 51: <span class="ruby-ivar">@debug</span> = <span class="ruby-identifier">debug</span>
212
- 52: <span class="ruby-ivar">@version</span> = <span class="ruby-identifier">version</span>
213
- 53: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;BigBlueButtonAPI: Using version #{@version}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@debug</span>
214
- 54: <span class="ruby-keyword kw">end</span>
215
- </pre>
216
- </div>
217
- </div>
218
- </div>
219
-
220
- <h3 class="section-bar">Public Instance methods</h3>
221
-
222
- <div id="method-M000007" class="method-detail">
223
- <a name="M000007"></a>
224
-
225
- <div class="method-heading">
226
- <a href="#M000007" class="method-signature">
227
- <span class="method-name">attendee_url</span><span class="method-args">(meeting_id, user_name, attendee_password, user_id = nil, web_voice_conf = nil)</span>
228
- </a>
229
- </div>
230
-
231
- <div class="method-description">
232
- <p>
233
- Returns url to login as attendee
234
- </p>
235
- <table>
236
- <tr><td valign="top">meeting_id:</td><td>Unique identifier for the meeting
237
-
238
- </td></tr>
239
- <tr><td valign="top">user_name:</td><td>Name of the user
240
-
241
- </td></tr>
242
- <tr><td valign="top">password:</td><td>Attendee password for this meeting
243
-
244
- </td></tr>
245
- <tr><td valign="top">user_id:</td><td>Unique identifier for this user (&gt;=0.7)
246
-
247
- </td></tr>
248
- <tr><td valign="top">web_voice_conf:</td><td>Custom voice-extension for users using VoIP (&gt;=0.7)
249
-
250
- </td></tr>
251
- </table>
252
- <p><a class="source-toggle" href="#"
253
- onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
254
- <div class="method-source-code" id="M000007-source">
255
- <pre>
256
- <span class="ruby-comment cmt"># File lib/bigbluebutton-api.rb, line 70</span>
257
- 70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attendee_url</span>(<span class="ruby-identifier">meeting_id</span>, <span class="ruby-identifier">user_name</span>, <span class="ruby-identifier">attendee_password</span>,
258
- 71: <span class="ruby-identifier">user_id</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">web_voice_conf</span> = <span class="ruby-keyword kw">nil</span>)
259
- 72:
260
- 73: <span class="ruby-identifier">params</span> = { <span class="ruby-identifier">:meetingID</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">meeting_id</span>, <span class="ruby-identifier">:password</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">attendee_password</span>, <span class="ruby-identifier">:fullName</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">user_name</span> }
261
- 74: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@version</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'0.7'</span>
262
- 75: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:userID</span>] = <span class="ruby-identifier">user_id</span>
263
- 76: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:webVoiceConf</span>] = <span class="ruby-identifier">web_voice_conf</span>
264
- 77: <span class="ruby-keyword kw">end</span>
265
- 78: <span class="ruby-identifier">get_url</span>(<span class="ruby-identifier">:join</span>, <span class="ruby-identifier">params</span>)
266
- 79: <span class="ruby-keyword kw">end</span>
267
- </pre>
268
- </div>
269
- </div>
270
- </div>
271
-
272
- <div id="method-M000008" class="method-detail">
273
- <a name="M000008"></a>
274
-
275
- <div class="method-heading">
276
- <a href="#M000008" class="method-signature">
277
- <span class="method-name">create_meeting</span><span class="method-args">(meeting_name, meeting_id, moderator_password, attendee_password, welcome_message = nil, dial_number = nil, logout_url = nil, max_participants = nil, voice_bridge = nil)</span>
278
- </a>
279
- </div>
280
-
281
- <div class="method-description">
282
- <p>
283
- Creates a <a href="BigBlueButtonApi.html#M000005">new</a> meeting. Returns
284
- the hash with the response or throws <a
285
- href="BigBlueButtonException.html">BigBlueButtonException</a> on failure.
286
- </p>
287
- <table>
288
- <tr><td valign="top">meeting_name:</td><td>Name for the meeting
289
-
290
- </td></tr>
291
- <tr><td valign="top">meeting_id:</td><td>Unique identifier for the meeting
292
-
293
- </td></tr>
294
- <tr><td valign="top">moderator_password:</td><td>Moderator password
295
-
296
- </td></tr>
297
- <tr><td valign="top">attendee_password:</td><td>Attendee password
298
-
299
- </td></tr>
300
- <tr><td valign="top">welcome_message:</td><td>Welcome message to display in chat window
301
-
302
- </td></tr>
303
- <tr><td valign="top">dialin_number:</td><td>Dial in number for conference using a regular phone
304
-
305
- </td></tr>
306
- <tr><td valign="top">logout_url:</td><td>URL to return user to after exiting meeting
307
-
308
- </td></tr>
309
- <tr><td valign="top">voice_bridge:</td><td>Voice conference number (&gt;=0.7)
310
-
311
- </td></tr>
312
- </table>
313
- <p>
314
- TODO check if voice_bridge exists in 0.64
315
- </p>
316
- <p><a class="source-toggle" href="#"
317
- onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
318
- <div class="method-source-code" id="M000008-source">
319
- <pre>
320
- <span class="ruby-comment cmt"># File lib/bigbluebutton-api.rb, line 92</span>
321
- 92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_meeting</span>(<span class="ruby-identifier">meeting_name</span>, <span class="ruby-identifier">meeting_id</span>, <span class="ruby-identifier">moderator_password</span>, <span class="ruby-identifier">attendee_password</span>,
322
- 93: <span class="ruby-identifier">welcome_message</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">dial_number</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">logout_url</span> = <span class="ruby-keyword kw">nil</span>,
323
- 94: <span class="ruby-identifier">max_participants</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">voice_bridge</span> = <span class="ruby-keyword kw">nil</span>)
324
- 95:
325
- 96: <span class="ruby-identifier">params</span> = { <span class="ruby-identifier">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">meeting_name</span>, <span class="ruby-identifier">:meetingID</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">meeting_id</span>,
326
- 97: <span class="ruby-identifier">:moderatorPW</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">moderator_password</span>, <span class="ruby-identifier">:attendeePW</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">attendee_password</span>,
327
- 98: <span class="ruby-identifier">:welcome</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">welcome_message</span>, <span class="ruby-identifier">:dialNumber</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">dial_number</span>,
328
- 99: <span class="ruby-identifier">:logoutURL</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">logout_url</span>, <span class="ruby-identifier">:maxParticpants</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">max_participants</span> }
329
- 100: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:voiceBridge</span>] = <span class="ruby-identifier">voice_bridge</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@version</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'0.7'</span>
330
- 101: <span class="ruby-identifier">send_api_request</span>(<span class="ruby-identifier">:create</span>, <span class="ruby-identifier">params</span>)
331
- 102: <span class="ruby-keyword kw">end</span>
332
- </pre>
333
- </div>
334
- </div>
335
- </div>
336
-
337
- <div id="method-M000009" class="method-detail">
338
- <a name="M000009"></a>
339
-
340
- <div class="method-heading">
341
- <a href="#M000009" class="method-signature">
342
- <span class="method-name">end_meeting</span><span class="method-args">(meeting_id, moderator_password)</span>
343
- </a>
344
- </div>
345
-
346
- <div class="method-description">
347
- <p>
348
- Ends an existing meeting. Throws <a
349
- href="BigBlueButtonException.html">BigBlueButtonException</a> on failure.
350
- </p>
351
- <table>
352
- <tr><td valign="top">meeting_id:</td><td>Unique identifier for the meeting
353
-
354
- </td></tr>
355
- <tr><td valign="top">moderator_password:</td><td>Moderator password
356
-
357
- </td></tr>
358
- </table>
359
- <p><a class="source-toggle" href="#"
360
- onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
361
- <div class="method-source-code" id="M000009-source">
362
- <pre>
363
- <span class="ruby-comment cmt"># File lib/bigbluebutton-api.rb, line 107</span>
364
- 107: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">end_meeting</span>(<span class="ruby-identifier">meeting_id</span>, <span class="ruby-identifier">moderator_password</span>)
365
- 108: <span class="ruby-identifier">send_api_request</span>(<span class="ruby-identifier">:end</span>, { <span class="ruby-identifier">:meetingID</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">meeting_id</span>, <span class="ruby-identifier">:password</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">moderator_password</span> } )
366
- 109: <span class="ruby-keyword kw">end</span>
367
- </pre>
368
- </div>
369
- </div>
370
- </div>
371
-
372
- <div id="method-M000012" class="method-detail">
373
- <a name="M000012"></a>
374
-
375
- <div class="method-heading">
376
- <a href="#M000012" class="method-signature">
377
- <span class="method-name">get_meeting_info</span><span class="method-args">(meeting_id, password)</span>
378
- </a>
379
- </div>
380
-
381
- <div class="method-description">
382
- <p>
383
- Returns a hash object containing the meeting information. See the API
384
- documentation for details on the return XML (<a
385
- href="http://code.google.com/p/bigbluebutton/wiki/API">code.google.com/p/bigbluebutton/wiki/API</a>).
386
- </p>
387
- <table>
388
- <tr><td valign="top">meeting_id:</td><td>Unique identifier for the meeting
389
-
390
- </td></tr>
391
- <tr><td valign="top">password:</td><td>Moderator password for this meeting
392
-
393
- </td></tr>
394
- </table>
395
- <p><a class="source-toggle" href="#"
396
- onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
397
- <div class="method-source-code" id="M000012-source">
398
- <pre>
399
- <span class="ruby-comment cmt"># File lib/bigbluebutton-api.rb, line 148</span>
400
- 148: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_meeting_info</span>(<span class="ruby-identifier">meeting_id</span>, <span class="ruby-identifier">password</span>)
401
- 149: <span class="ruby-identifier">send_api_request</span>(<span class="ruby-identifier">:getMeetingInfo</span>, { <span class="ruby-identifier">:meetingID</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">meeting_id</span>, <span class="ruby-identifier">:password</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">password</span> } )
402
- 150: <span class="ruby-keyword kw">end</span>
403
- </pre>
404
- </div>
405
- </div>
406
- </div>
407
-
408
- <div id="method-M000013" class="method-detail">
409
- <a name="M000013"></a>
410
-
411
- <div class="method-heading">
412
- <a href="#M000013" class="method-signature">
413
- <span class="method-name">get_meetings</span><span class="method-args">()</span>
414
- </a>
415
- </div>
416
-
417
- <div class="method-description">
418
- <p>
419
- Returns a hash object containing the meeting information. See the API
420
- documentation for details on the return XML (<a
421
- href="http://code.google.com/p/bigbluebutton/wiki/API">code.google.com/p/bigbluebutton/wiki/API</a>).
422
- &gt;= 0.7
423
- </p>
424
- <p>
425
- TODO check if getMeetings exists in 0.64
426
- </p>
427
- <p><a class="source-toggle" href="#"
428
- onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
429
- <div class="method-source-code" id="M000013-source">
430
- <pre>
431
- <span class="ruby-comment cmt"># File lib/bigbluebutton-api.rb, line 158</span>
432
- 158: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_meetings</span>
433
- 159: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@version</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'0.7'</span>
434
- 160: <span class="ruby-identifier">send_api_request</span>(<span class="ruby-identifier">:getMeetings</span>, { <span class="ruby-identifier">:random</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">rand</span>(<span class="ruby-value">9999999999</span>) } )
435
- 161: <span class="ruby-keyword kw">else</span>
436
- 162: {}
437
- 163: <span class="ruby-keyword kw">end</span>
438
- 164: <span class="ruby-keyword kw">end</span>
439
- </pre>
440
- </div>
441
- </div>
442
- </div>
443
-
444
- <div id="method-M000010" class="method-detail">
445
- <a name="M000010"></a>
446
-
447
- <div class="method-heading">
448
- <a href="#M000010" class="method-signature">
449
- <span class="method-name">is_meeting_running?</span><span class="method-args">(meeting_id)</span>
450
- </a>
451
- </div>
452
-
453
- <div class="method-description">
454
- <p>
455
- Returns true or false as to whether meeting is open. A meeting is only open
456
- after at least one participant has joined.
457
- </p>
458
- <table>
459
- <tr><td valign="top">meeting_id:</td><td>Unique identifier for the meeting
460
-
461
- </td></tr>
462
- </table>
463
- <p><a class="source-toggle" href="#"
464
- onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
465
- <div class="method-source-code" id="M000010-source">
466
- <pre>
467
- <span class="ruby-comment cmt"># File lib/bigbluebutton-api.rb, line 114</span>
468
- 114: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_meeting_running?</span>(<span class="ruby-identifier">meeting_id</span>)
469
- 115: <span class="ruby-identifier">hash</span> = <span class="ruby-identifier">send_api_request</span>(<span class="ruby-identifier">:isMeetingRunning</span>, { <span class="ruby-identifier">:meetingID</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">meeting_id</span> } )
470
- 116: <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:running</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;true&quot;</span>
471
- 117: <span class="ruby-keyword kw">end</span>
472
- </pre>
473
- </div>
474
- </div>
475
- </div>
476
-
477
- <div id="method-M000011" class="method-detail">
478
- <a name="M000011"></a>
479
-
480
- <div class="method-heading">
481
- <a href="#M000011" class="method-signature">
482
- <span class="method-name">join_meeting</span><span class="method-args">(meeting_id, user_name, password, user_id = nil, web_voice_conf = nil)</span>
483
- </a>
484
- </div>
485
-
486
- <div class="method-description">
487
- <p>
488
- Warning: As of this version of the gem, this call does not work (instead of
489
- returning XML response, it should join the meeting).
490
- </p>
491
- <p>
492
- Joins a user into the meeting using an API call, instead of directing the
493
- user&#8216;s browser to <a
494
- href="BigBlueButtonApi.html#M000006">moderator_url</a> or <a
495
- href="BigBlueButtonApi.html#M000007">attendee_url</a> (note: this will
496
- still be required however to actually use bbb). Returns the URL a user can
497
- use to enter this meeting.
498
- </p>
499
- <table>
500
- <tr><td valign="top">meeting_id:</td><td>Unique identifier for the meeting
501
-
502
- </td></tr>
503
- <tr><td valign="top">user_name:</td><td>Name of the user
504
-
505
- </td></tr>
506
- <tr><td valign="top">password:</td><td>Moderator or attendee password for this meeting
507
-
508
- </td></tr>
509
- <tr><td valign="top">user_id:</td><td>Unique identifier for this user (&gt;=0.7)
510
-
511
- </td></tr>
512
- <tr><td valign="top">web_voice_conf:</td><td>Custom voice-extension for users using VoIP (&gt;=0.7)
513
-
514
- </td></tr>
515
- </table>
516
- <p><a class="source-toggle" href="#"
517
- onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
518
- <div class="method-source-code" id="M000011-source">
519
- <pre>
520
- <span class="ruby-comment cmt"># File lib/bigbluebutton-api.rb, line 131</span>
521
- 131: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">join_meeting</span>(<span class="ruby-identifier">meeting_id</span>, <span class="ruby-identifier">user_name</span>, <span class="ruby-identifier">password</span>, <span class="ruby-identifier">user_id</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">web_voice_conf</span> = <span class="ruby-keyword kw">nil</span>)
522
- 132: <span class="ruby-identifier">params</span> = { <span class="ruby-identifier">:meetingID</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">meeting_id</span>, <span class="ruby-identifier">:password</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">password</span>, <span class="ruby-identifier">:fullName</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">user_name</span> }
523
- 133: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@version</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'0.64'</span>
524
- 134: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:redirectImmediately</span>] = <span class="ruby-value">0</span>
525
- 135: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@version</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'0.7'</span>
526
- 136: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:userID</span>] = <span class="ruby-identifier">user_id</span>
527
- 137: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:webVoiceConf</span>] = <span class="ruby-identifier">web_voice_conf</span>
528
- 138: <span class="ruby-keyword kw">end</span>
529
- 139: <span class="ruby-identifier">send_api_request</span>(<span class="ruby-identifier">:join</span>, <span class="ruby-identifier">params</span>)
530
- 140: <span class="ruby-keyword kw">end</span>
531
- </pre>
532
- </div>
533
- </div>
534
- </div>
535
-
536
- <div id="method-M000006" class="method-detail">
537
- <a name="M000006"></a>
538
-
539
- <div class="method-heading">
540
- <a href="#M000006" class="method-signature">
541
- <span class="method-name">moderator_url</span><span class="method-args">(meeting_id, user_name, password)</span>
542
- </a>
543
- </div>
544
-
545
- <div class="method-description">
546
- <p>
547
- Returns url to login as moderator
548
- </p>
549
- <table>
550
- <tr><td valign="top">meeting_id:</td><td>Unique identifier for the meeting
551
-
552
- </td></tr>
553
- <tr><td valign="top">user_name:</td><td>Name of the user
554
-
555
- </td></tr>
556
- <tr><td valign="top">password:</td><td>Moderator password for this meeting
557
-
558
- </td></tr>
559
- </table>
560
- <p><a class="source-toggle" href="#"
561
- onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
562
- <div class="method-source-code" id="M000006-source">
563
- <pre>
564
- <span class="ruby-comment cmt"># File lib/bigbluebutton-api.rb, line 60</span>
565
- 60: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">moderator_url</span>(<span class="ruby-identifier">meeting_id</span>, <span class="ruby-identifier">user_name</span>, <span class="ruby-identifier">password</span>)
566
- 61: <span class="ruby-identifier">attendee_url</span>(<span class="ruby-identifier">meeting_id</span>, <span class="ruby-identifier">user_name</span>, <span class="ruby-identifier">password</span>)
567
- 62: <span class="ruby-keyword kw">end</span>
568
- </pre>
569
- </div>
570
- </div>
571
- </div>
572
-
573
- <h3 class="section-bar">Protected Instance methods</h3>
574
-
575
- <div id="method-M000014" class="method-detail">
576
- <a name="M000014"></a>
577
-
578
- <div class="method-heading">
579
- <a href="#M000014" class="method-signature">
580
- <span class="method-name">get_url</span><span class="method-args">(method, data)</span>
581
- </a>
582
- </div>
583
-
584
- <div class="method-description">
585
- <p><a class="source-toggle" href="#"
586
- onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
587
- <div class="method-source-code" id="M000014-source">
588
- <pre>
589
- <span class="ruby-comment cmt"># File lib/bigbluebutton-api.rb, line 168</span>
590
- 168: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_url</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">data</span>)
591
- 169: <span class="ruby-identifier">base_url</span> = <span class="ruby-node">&quot;#{@base_url}/#{method}?&quot;</span>
592
- 170: <span class="ruby-identifier">params</span> = <span class="ruby-value str">&quot;&quot;</span>
593
- 171: <span class="ruby-identifier">params</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">map</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-node">&quot;#{k}=&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-constant">CGI</span><span class="ruby-operator">::</span><span class="ruby-identifier">escape</span>(<span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">nil?</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;&amp;&quot;</span>)
594
- 172: <span class="ruby-identifier">checksum_param</span> = <span class="ruby-identifier">params</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@salt</span>
595
- 173: <span class="ruby-identifier">checksum_param</span> = <span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">checksum_param</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@version</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'0.7'</span>
596
- 174: <span class="ruby-identifier">checksum</span> = <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">checksum_param</span>)
597
- 175: <span class="ruby-node">&quot;#{base_url}#{params}&amp;checksum=#{checksum}&quot;</span>
598
- 176: <span class="ruby-keyword kw">end</span>
599
- </pre>
600
- </div>
601
- </div>
602
- </div>
603
-
604
- <div id="method-M000015" class="method-detail">
605
- <a name="M000015"></a>
606
-
607
- <div class="method-heading">
608
- <a href="#M000015" class="method-signature">
609
- <span class="method-name">send_api_request</span><span class="method-args">(method, data = {})</span>
610
- </a>
611
- </div>
612
-
613
- <div class="method-description">
614
- <p><a class="source-toggle" href="#"
615
- onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
616
- <div class="method-source-code" id="M000015-source">
617
- <pre>
618
- <span class="ruby-comment cmt"># File lib/bigbluebutton-api.rb, line 178</span>
619
- 178: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_api_request</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">data</span> = {})
620
- 179: <span class="ruby-identifier">url</span> = <span class="ruby-identifier">get_url</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">data</span>)
621
- 180: <span class="ruby-identifier">res</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get_response</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">url</span>))
622
- 181: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;BigBlueButtonAPI: URL request = #{url}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@debug</span>
623
- 182: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;BigBlueButtonAPI: URL response = #{res.body}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@debug</span>
624
- 183:
625
- 184: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">empty?</span>
626
- 185: <span class="ruby-identifier">raise</span> <span class="ruby-constant">BigBlueButtonException</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;BigBlueButton error: No XML in the response body&quot;</span>)
627
- 186: <span class="ruby-keyword kw">end</span>
628
- 187:
629
- 188: <span class="ruby-comment cmt"># 'Hashfy' the XML and remove the &quot;response&quot; node</span>
630
- 189: <span class="ruby-identifier">hash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">from_xml</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span>
631
- 190: <span class="ruby-identifier">hash</span> = <span class="ruby-constant">Hash</span>[<span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:response</span>]].<span class="ruby-identifier">inject</span>({}){<span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)<span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>; <span class="ruby-identifier">h</span>}
632
- 191: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;BigBlueButtonAPI: URL response hash = #{hash.inspect}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@debug</span>
633
- 192:
634
- 193: <span class="ruby-identifier">return_code</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:returncode</span>]
635
- 194: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">return_code</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;SUCCESS&quot;</span>
636
- 195: <span class="ruby-identifier">raise</span> <span class="ruby-constant">BigBlueButtonException</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;BigBlueButton error: #{hash[:message]}&quot;</span>)
637
- 196: <span class="ruby-keyword kw">end</span>
638
- 197: <span class="ruby-identifier">hash</span>
639
- 198: <span class="ruby-keyword kw">end</span>
640
- </pre>
641
- </div>
642
- </div>
643
- </div>
644
-
645
-
646
- </div>
647
-
648
-
649
- </div>
650
-
651
-
652
- <div id="validator-badges">
653
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
654
- </div>
655
-
656
- </body>
657
- </html>