bigbluebutton-api-ruby 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,8 @@
1
- == 0.0.7
1
+ == 0.0.9
2
+
3
+ * Simplied "attendees" part of the hash returned in get_meeting_info. Same thing done for get_meetings.
4
+
5
+ == 0.0.8
2
6
 
3
7
  * New method get_api_version that returns the version of the server API (>= 0.7).
4
8
  * New simplified hash syntax for get_meetings. See docs for details.
@@ -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 = '0.0.8'
5
+ s.version = '0.0.9'
6
6
  s.extra_rdoc_files = ['README.rdoc', 'LICENSE', '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
@@ -108,12 +108,12 @@ module BigBlueButton
108
108
  # logout_url:: URL to return user to after exiting meeting
109
109
  # voice_bridge:: Voice conference number (>= 0.7)
110
110
  #
111
- # === Return examples
111
+ # === Return examples (for 0.7)
112
112
  #
113
113
  # On successful creation:
114
114
  #
115
115
  # {
116
- # :returncode=>"SUCCESS", :meetingID=>"bigbluebutton-api-ruby-test3",
116
+ # :returncode=>"SUCCESS", :meetingID=>"bigbluebutton-api-ruby-test",
117
117
  # :attendeePW=>1234, :moderatorPW=>4321, :hasBeenForciblyEnded=>"false",
118
118
  # :messageKey=>{}, :message=>{}
119
119
  # }
@@ -121,7 +121,7 @@ module BigBlueButton
121
121
  # Meeting that was just forcibly ended:
122
122
  #
123
123
  # {
124
- # :returncode=>"SUCCESS", :meetingID=>"bigbluebutton-api-ruby-test3",
124
+ # :returncode=>"SUCCESS", :meetingID=>"bigbluebutton-api-ruby-test",
125
125
  # :attendeePW=>1234, :moderatorPW=>4321, :hasBeenForciblyEnded=>"true",
126
126
  # :messageKey=>"duplicateWarning",
127
127
  # :message=>"This conference was already in existence and may currently be in progress."
@@ -144,7 +144,7 @@ module BigBlueButton
144
144
  # meeting_id:: Unique identifier for the meeting
145
145
  # moderator_password:: Moderator password
146
146
  #
147
- # === Return examples
147
+ # === Return examples (for 0.7)
148
148
  #
149
149
  # On success:
150
150
  #
@@ -195,14 +195,54 @@ module BigBlueButton
195
195
  #
196
196
  # meeting_id:: Unique identifier for the meeting
197
197
  # password:: Moderator password for this meeting
198
+ #
199
+ # === Return examples (for 0.7)
200
+ #
201
+ # With attendees:
202
+ #
203
+ # {
204
+ # :returncode=>"SUCCESS", :meetingID=>"bigbluebutton-api-ruby-test", :attendeePW=>1234, :moderatorPW=>4321, :running=>"true",
205
+ # :hasBeenForciblyEnded=>"false", :startTime=>"Wed Apr 06 17:09:57 UTC 2011", :endTime=>"null", :participantCount=>4, :moderatorCount=>2,
206
+ # :attendees => [
207
+ # {:userID=>"ndw1fnaev0rj", :fullName=>"House M.D.", :role=>"MODERATOR"},
208
+ # {:userID=>"gn9e22b7ynna", :fullName=>"Dexter Morgan", :role=>"MODERATOR"},
209
+ # {:userID=>"llzihbndryc3", :fullName=>"Cameron Palmer", :role=>"VIEWER"},
210
+ # {:userID=>"rbepbovolsxt", :fullName=>"Trinity", :role=>"VIEWER"}
211
+ # ], :messageKey=>{}, :message=>{}
212
+ # }
213
+ #
214
+ # Without attendees (not started):
215
+ #
216
+ # {
217
+ # :returncode=>"SUCCESS", :meetingID=>"bigbluebutton-api-ruby-test", :attendeePW=>1234, :moderatorPW=>4321, :running=>"false",
218
+ # :hasBeenForciblyEnded=>"false", :startTime=>"null", :endTime=>"null", :participantCount=>0, :moderatorCount=>0,
219
+ # :attendees=>[], :messageKey=>{ }, :message=>{ }
220
+ # }
221
+ #
198
222
  def get_meeting_info(meeting_id, password)
199
- send_api_request(:getMeetingInfo, { :meetingID => meeting_id, :password => password } )
223
+ response = send_api_request(:getMeetingInfo, { :meetingID => meeting_id, :password => password } )
224
+
225
+ # simplify the hash making a node :attendees with an array with all attendees
226
+ if response[:attendees].empty?
227
+ meetings = []
228
+ else
229
+ node = response[:attendees][:attendee]
230
+ if node.kind_of?(Array)
231
+ meetings = node
232
+ else
233
+ meetings = []
234
+ meetings << node
235
+ end
236
+ end
237
+ response[:attendees] = meetings
238
+
239
+ response
200
240
  end
201
241
 
202
242
  # Returns a hash object containing information about the meetings currently existent in the BBB
203
243
  # server, either they are running or not.
204
244
  #
205
- # === Return examples
245
+ # === Return examples (for 0.7)
206
246
  #
207
247
  # Server with one or more meetings:
208
248
  #
@@ -221,10 +261,10 @@ module BigBlueButton
221
261
  response = send_api_request(:getMeetings, { :random => rand(9999999999) } )
222
262
 
223
263
  # simplify the hash making a node :meetings with an array with all meetings
224
- node = response[:meetings][:meeting]
225
264
  if response[:meetings].empty?
226
265
  meetings = []
227
266
  else
267
+ node = response[:meetings][:meeting]
228
268
  if node.kind_of?(Array)
229
269
  meetings = node
230
270
  else
@@ -263,10 +303,10 @@ module BigBlueButton
263
303
  end
264
304
 
265
305
  # API's are equal if all the following attributes are equal
266
- def == other
306
+ def ==(other)
267
307
  r = true
268
308
  [:url, :supported_versions, :salt, :version, :debug].each do |param|
269
- r = r and self.send(param) == other.send(param)
309
+ r = r && self.send(param) == other.send(param)
270
310
  end
271
311
  r
272
312
  end
@@ -77,6 +77,14 @@ def general_test
77
77
  puts "Meeting info:"
78
78
  puts response.inspect
79
79
 
80
+ puts
81
+ puts "---------------------------------------------------"
82
+ puts "Attendees:"
83
+ response[:attendees].each do |m|
84
+ puts " " + m[:fullName] + " (" + m[:userID] + "): " + m.inspect
85
+ end
86
+
87
+
80
88
  puts
81
89
  puts "---------------------------------------------------"
82
90
  @api.end_meeting(@config['meeting_id'], @config['moderator_password'])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigbluebutton-api-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-04-06 00:00:00.000000000Z
13
+ date: 2011-04-08 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri
17
- requirement: &78256160 !ruby/object:Gem::Requirement
17
+ requirement: &78653840 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,7 +22,7 @@ dependencies:
22
22
  version: 1.4.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *78256160
25
+ version_requirements: *78653840
26
26
  description: Provides an interface to the BigBlueButton web meeting API (https://github.com/mconf/bigbluebutton-api-ruby)
27
27
  email:
28
28
  - leonardodaronco@gmail.com