API-BigBlueButton
view release on metacpan or search on metacpan
lib/API/BigBlueButton/Requests.pm view on Meta::CPAN
This parameter is mandatory.
The meeting ID that identifies the meeting you are attempting to end.
password
This parameter is mandatory.
The moderator password for this meeting. You can not end a meeting using the attendee password.
=cut
sub end {
my ( $self, %params ) = @_;
my $data = $self->_generate_data( 'end', \%params );
return $self->abstract_request( $data );
}
=item B<getmeetinginfo($self,%params)>
This call will return all of a meeting's information,
including the list of attendees as well as start and end times.
%params:
meetingID
This parameter is mandatory.
The meeting ID that identifies the meeting you are attempting to check on.
password
This parameter is mandatory.
The moderator password for this meeting.
You can not get the meeting information using the attendee password.
=cut
sub getmeetinginfo {
my ( $self, %params ) = @_;
my $data = $self->_generate_data( 'getMeetingInfo', \%params );
return $self->abstract_request( $data );
}
=item B<getmeetings($self)>
This call will return a list of all the meetings found on this server.
=cut
sub getmeetings {
my ( $self ) = @_;
my $data = $self->_generate_data( 'getMeetings' );
return $self->abstract_request( $data );
}
=item B<getrecordings($self,%params)>
Retrieves the recordings that are available for playback for a given meetingID (or set of meeting IDs).
%params:
meetingID
This parameter is optional.
=cut
sub getrecordings {
my ( $self, %params ) = @_;
my $data = $self->_generate_data( 'getRecordings', \%params );
return $self->abstract_request( $data );
}
=item B<publishrecordings($self,%params)>
Publish and unpublish recordings for a given recordID (or set of record IDs).
%params:
recordID
This parameter is mandatory.
A record ID for specify the recordings to apply the publish action.
It can be a set of record IDs separated by commas.
publish
This parameter is mandatory.
The value for publish or unpublish the recording(s). Available values: true or false.
=cut
sub publishrecordings {
my ( $self, %params ) = @_;
my $data = $self->_generate_data( 'publishRecordings', \%params );
return $self->abstract_request( $data );
}
=item B<deleterecordings($self,%params)>
Delete one or more recordings for a given recordID (or set of record IDs).
%params:
recordID
This parameter is mandatory.
A record ID for specify the recordings to delete.
It can be a set of record IDs separated by commas.
=cut
sub deleterecordings {
my ( $self, %params ) = @_;
my $data = $self->_generate_data( 'deleteRecordings', \%params );
return $self->abstract_request( $data );
}
=item B<getdefaultconfigxml($self)>
Retrieve the default config.xml.
SEE MORE L<https://code.google.com/p/bigbluebutton/wiki/API#getDefaultConfigXML>
=cut
sub getdefaultconfigxml {
my ( $self ) = @_;
my $data = $self->_generate_data( 'getDefaultConfigXML' );
return $self->abstract_request( $data );
}
=item B<setconfigxml($self,%params)>
Associate an custom config.xml file with the current session.
%params:
meetingID
This parameter is mandatory.
A meetingID to an active meeting.
configXML
This parameter is mandatory.
A valid config.xml file
SEE MORE L<https://code.google.com/p/bigbluebutton/wiki/API#setConfigXML>
=cut
sub setconfigxml {
my ( $self, %params ) = @_;
my $data = $self->_generate_data( 'setConfigXML', \%params );
return $self->abstract_request( $data );
}
=item B<generate_checksum($self,$request,$params)>
Create a checksum for the query
$request
Name of query, e.g. 'create' or 'join'
$params:
Query parameters
my $chksum = $self->generate_checksum( 'create', \%params );
=cut
sub generate_checksum {
my ( $self, $request, $params ) = @_;
my $string = $request;
$string .= $self->generate_url_query( $params ) if ( $params && ref $params );
$string .= $self->{secret};
return sha1_hex( $string );
}
=item B<generate_url_query($self,$params)>
Creating a query string
$params:
Query parameters
$params{checksum} = $self->generate_checksum( 'create', \%params );
$params{request} = 'create';
my $url = $self->generate_url_query( \%params );
=cut
sub generate_url_query {
my ( $self, $params ) = @_;
my $string = CORE::join( '&', map { "$_=$params->{$_}" } sort keys %{ $params } );
return $string;
}
sub _generate_data {
my ( $self, $request, $params ) = @_;
$self->_check_params( $request, $params ) if $params;
$params->{checksum} = $self->generate_checksum( $request, $params );
$params->{request} = $request;
return $params;
}
( run in 1.703 second using v1.01-cache-2.11-cpan-5b529ec07f3 )