Bb::Collaborate::Ultra::Session::Log
Session logging class.
my @sessions = Bb::Collaborate::Ultra::Session->get($connection, {contextId => $context_id}); for my $session (@sessions) { print "Session: ". $session->name . "\n"; my @logs = $session->logs({expand => 'attendees' }); for my $log (@logs) { say "\tOpened: " .(scalar localtime $log->opened); for my $attendee (@{$log->attendees}) { my $first_join; my $elapsed = 0; for my $attendance (@{$attendee->attendance}) { my $joined = $attendance->joined; $first_join = $joined if !$first_join || $first_join > $joined; $elapsed += $attendance->left - $joined; } say sprintf("\tUser %s (%s) joined at %s, stayed %d minutes", $attendee->externalUserId, $attendee->displayName, (scalar localtime $first_join), $elapsed / 60); } say "\tClosed: " .(scalar localtime $log->closed); } }
This class supports the `get` method as described in https://xx-csa.bbcollab.com/documentation#Attendee-collection.
Returns a list of attendees for this session instance;
my @all_attendees; my @logs = $session->get_logs; for my $log (@logs) { push @all_attendees, $log->get_attendees; }
Note: Alternatively, the expand = 'attendees'> query parameter may be set in the get_logs. This causes the server to eagerly populate the attendees in each session log.
expand =
get_logs
my @all_attendees; my @logs = $session->get_logs({expand => 'attendees' }); for my $log (@logs) { push @all_attendees, @{ $log->attendees }; }
This reduces the number of calls to the server, and is generally faster.
To install Bb::Collaborate::Ultra, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bb::Collaborate::Ultra
CPAN shell
perl -MCPAN -e shell install Bb::Collaborate::Ultra
For more information on module installation, please visit the detailed CPAN module installation guide.