API-BigBlueButton

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
    use API::BigBlueButton;
 
    my $bbb = API::BigBlueButton->new( server => 'bbb.myhost', secret => '1234567890' );
    my $res = $bbb->get_version;
 
    if ( $res->success ) {
        my $version = $res->response->version
    }
    else {
        warn "Error occured: " . $res->error . ", Status: " . $res->status;
    }
 
# DESCRIPTION
 
client for BigBlueButton API
 
# VERSION
 
version 0.015

lib/API/BigBlueButton.pm  view on Meta::CPAN

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    use API::BigBlueButton;
 
    my $bbb = API::BigBlueButton->new( server => 'bbb.myhost', secret => '1234567890' );
    my $res = $bbb->get_version;
 
    if ( $res->success ) {
        my $version = $res->response->version
    }
    else {
        warn "Error occured: " . $res->error . ", Status: " . $res->status;
    }
 
=head1 DESCRIPTION
 
client for BigBlueButton API
 
=cut
 
use 5.008008;
use strict;

lib/API/BigBlueButton/Response.pm  view on Meta::CPAN

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
    HTTP::Response object.
 
=cut
 
sub new {
    my ( $class, $res ) = @_;
 
    my $success   = $res->is_success;
    my $xml       = $success ? $res->decoded_content : '';
    my $error     = $success ? '' : $res->decoded_content;
    my $status    = $res->status_line;
 
    my $parsed_response = $xml ? xml2hash( $xml, attr => '' ) : {};
 
    return bless(
        {
            success  => $success,
            xml      => $xml,
            error    => $error,
            response => $parsed_response->{response} ? $parsed_response->{response} : $parsed_response,
            status   => $status,
        }, $class
    );
}
 
=item B<xml($self)>
 
Returns original XML answer.

lib/API/BigBlueButton/Response.pm  view on Meta::CPAN

84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
Returns munged response from service. According to method, it can be scalar, hashref of arrayref.
 
=cut
 
sub response {
    my ( $self ) = @_;
 
    return $self->{response};
}
 
=item B<error($self)>
 
Returns munged error text.
 
=cut
 
sub error {
    my ( $self ) = @_;
 
    return $self->{error};
}
 
=item B<status($self)>
 
Returns response status line.
 
=cut
 
sub status {
    my ( $self ) = @_;



( run in 0.843 second using v1.01-cache-2.11-cpan-87723dcf8b7 )