forked from bigbluebutton/bbb-events
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.rb
More file actions
executable file
·44 lines (30 loc) · 813 Bytes
/
example.rb
File metadata and controls
executable file
·44 lines (30 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/ruby
require 'bbbevents'
exit if ARGV.length < 1
eventsxml = ARGV[0]
# Parse the recording's events.xml.
recording = BBBEvents.parse(eventsxml)
# Access recording data.
recording.metadata
recording.meeting_id
# Retrieve start, finish time objects or total duration in seconds.
recording.start
recording.finish
recording.duration
# Returns a list of Attendee objects.
recording.attendees
recording.moderators
recording.viewers
# Returns a list of Poll objects.
recording.polls
recording.published_polls
recording.unpublished_polls
# Returns a list of upload files (names only).
recording.files
# Generate a CSV file with the data.
recording.create_csv("data.csv")
puts "Writing the JSON data"
# Write JSON data to file.
File.open("data.json", 'w') do |f|
f.write(recording.to_json)
end