File Coverage

blib/lib/Bb/Collaborate/Ultra.pm
Criterion Covered Total %
statement 5 5 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 7 7 100.0


line stmt bran cond sub pod time code
1             package Bb::Collaborate::Ultra;
2              
3             =head1 NAME
4              
5             Bb::Collaborate::Ultra - Perl bindings for Blackboard Ultra virtual classrooms
6              
7             =head1 VERSION
8              
9             Version 0.01.01
10              
11             =cut
12              
13 1     1   24279 use strict;
  1         2  
  1         33  
14             our $VERSION = '0.01.01';
15              
16 1     1   14 use 5.008003;
  1         2  
17              
18             =head1 SYNOPSIS
19              
20             use Bb::Collaborate::Ultra::Connection;
21             use Bb::Collaborate::Ultra::Session;
22             use Bb::Collaborate::Ultra::User;
23             use Bb::Collaborate::Ultra::LaunchContext;
24              
25             my %credentials = (
26             issuer => 'OUUK-REST-API12340ABCD',
27             secret => 'ABCDEF0123456789AA',
28             host => 'https://xx-csa.bbcollab.com',
29             );
30              
31             # connect to server
32             my $connection = Bb::Collaborate::Ultra::Connection->new(\%credentials);
33             $connection->connect;
34              
35             # create a virtual classroom, starts now runs, for 15 minutes
36             my $start = time() + 60;
37             my $end = $start + 900;
38             my $session = Bb::Collaborate::Ultra::Session->post($connection, {
39             name => 'Test Session',
40             startTime => $start,
41             endTime => $end,
42             },
43             );
44              
45             # define a session user
46             my $user = Bb::Collaborate::Ultra::User->new({
47             extId => 'dwarring',
48             displayName => 'David Warring',
49             email => 'david.warring@gmail.com',
50             firstName => 'David',
51             lastName => 'Warring',
52             });
53              
54             # register the user. obtain a join URL
55             my $launch_context = Bb::Collaborate::Ultra::LaunchContext->new({
56             launchingRole => 'moderator',
57             editingPermission => 'writer',
58             user => $user,
59             });
60             my $url = $launch_context->join_session($session);
61              
62             =head1 BACKGROUND
63              
64             Blackboard Collaborate Ultra is software for virtual web classrooms. It is
65             suitable for meetings, demonstrations web conferences, seminars, general
66             training and support.
67              
68             Bb-Ultra is a set of Perl bindings and entity definitions for the
69             Collaborate REST services. These can be used to administer classrooms,
70             including sessions, users and recordings.
71              
72             =head1 DESCRIPTION
73              
74             This Perl 5 module provides bindings to the the Collaborate (*) Services RESTful API. These support the CRUD and processing operations for the scheduling and access to HTML sessions.
75              
76             These services are described in L.
77              
78             =head2 Resource Classes
79              
80              
81             Each resource class is represented by a Perl 5 class:
82              
83             =over 4
84              
85             =item Context - L (see L)
86              
87             =item Session - L (see L)
88              
89             =item Recording - L (see L)
90              
91             =item Session Logs - L (see L)
92              
93             =back
94              
95             =head2 RESTful Services
96              
97             The above classes are based on Bb::Collaborate::Ultra::DAO, which provides low level `post`, `get`, `patch` and `delete` methods. Where:
98              
99             =over 4
100              
101             =item `post` creates new entities on the server
102              
103             =item `get` is used to fetched entities, by `id` or various other criteria
104              
105             =item `patch` is used to update entities
106              
107             =item `delete` is used to delete items
108              
109             =back
110              
111             =head2 Data Mapping
112              
113             Some conversion is needed between JSON and Perl:
114              
115             =over 4
116              
117             =item - Boolean `true` and `false` are converted to 0 and 1
118              
119             =item - JSON date strings are converted to Unix numeric timestamps, rounded to the nearest second. For example, `2016-12-15T22:26:17.000Z` is converted to 1481840777.
120              
121             =back
122              
123             These conversions are applied on data being sent or received from the Collaborate Ultra server.
124              
125             =head2 Authentication
126              
127             Authentication is via the OAuth 2.0 protocol, using the JWT Token Flow, as described in the L.
128              
129             See L for details.
130              
131             =head1 SCRIPTS
132              
133             =head2 bb-collab-session-log
134              
135             Tjhis is a sample script to dump basic session logging for a
136             completed session.
137              
138             =head1 BUGS AND LIMITATIONS
139              
140             =over 4
141              
142             =item - This module does not yet fully implement resource types: Users, Enrollments or Courses
143              
144             =item - JWT Username-Password authentication is not yet supported.
145              
146             =back
147              
148             =head1 COPYRIGHT & LICENSE
149              
150             Copyright 2017 David Warring, all rights reserved.
151              
152             This program is free software; you can redistribute it and/or modify it
153             under the same terms as Perl itself.
154              
155             =cut
156              
157             1; # End of Bb::Collaborate::Ultra