-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stefan Auditor
committed
Mar 2, 2016
0 parents
commit b615b01
Showing
12 changed files
with
2,032 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
language: php | ||
|
||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- hhvm | ||
|
||
before_script: | ||
- composer self-update | ||
- composer install --prefer-source --no-interaction --dev | ||
|
||
script: phpunit |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# PHP BigBlueButton API Library | ||
|
||
> BigBlueButton is an open source web conferencing system for on-line learning. – http://www.bigbluebutton.org | ||
This is a php library to interface with a BigBlueButton server instance. | ||
|
||
## Installation | ||
|
||
Get [Composer](https://getcomposer.org/) and install it. | ||
Then clone the repository and run: | ||
|
||
composer install | ||
|
||
## Usage | ||
|
||
To get your API URL and secret login to your BigBlueButton server and run: | ||
|
||
$ bbb-conf --secret | ||
URL: http://example.org/bigbluebutton/ | ||
Secret: aiShaiteih6nahchie1quaiyul8ce4Zu | ||
|
||
Initialize a BigBlueButton object: | ||
|
||
<?php | ||
|
||
require_once 'vendor/autoload.php'; | ||
|
||
use sanduhrs\BigBlueButton; | ||
|
||
$bbb = new BigBlueButton( | ||
'http://example.org/bigbluebutton/', | ||
'aiShaiteih6nahchie1quaiyul8ce4Zu', | ||
'api/' | ||
); | ||
|
||
Get the version of the remote server: | ||
|
||
$version = $bbb->server->getVersion(); | ||
print "$version\n"; | ||
|
||
Add a meeting: | ||
|
||
$meeting = $bbb->server->addMeeting( | ||
'123-456-789-000', | ||
'Guphei4i', | ||
'ioy9Xep9', | ||
[ | ||
'name' => 'A BigBlueButton meeting', | ||
'welcome' => 'Welcome to %%CONFNAME%%.', | ||
'logoutURL' => 'https://example.org/', | ||
'record' = true, | ||
'autoStartRecording' = true, | ||
] | ||
); | ||
|
||
Get meeting join URL for a moderator: | ||
|
||
$full_name = 'Martin Moderator'; | ||
$url = $meeting->join($full_name, true); | ||
|
||
Get meeting join URL for an attendee: | ||
|
||
$full_name = 'Anton Attendee'; | ||
$url = $meeting->join($full_name); | ||
|
||
## Tests | ||
|
||
./vendor/bin/phpunit | ||
|
||
## License | ||
GNU GENERAL PUBLIC LICENSE (GPL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "sanduhrs/php-bigbluebutton", | ||
"type": "library", | ||
"license": "GPL", | ||
"authors": [ | ||
{ | ||
"name": "Stefan Auditor", | ||
"email": "stefan.auditor@erdfisch.de" | ||
} | ||
], | ||
"require": { | ||
"guzzlehttp/guzzle": "^6.1" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^5.2" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"sanduhrs\\": "src/" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Contains sanduhrs\BigBlueButton. | ||
*/ | ||
|
||
namespace sanduhrs; | ||
|
||
use sanduhrs\BigBlueButton\Server; | ||
use sanduhrs\BigBlueButton\Client; | ||
|
||
/** | ||
* Class BigBlueButton | ||
* | ||
* @package sanduhrs | ||
*/ | ||
class BigBlueButton | ||
{ | ||
|
||
/** | ||
* The BigBlueButton library version. | ||
* | ||
* @var string | ||
* A version string. | ||
*/ | ||
const VERSION = '0.3.0'; | ||
|
||
/** | ||
* The BigBlueButton API version. | ||
* | ||
* @var string | ||
* A version string. | ||
*/ | ||
const API_VERSION = '0.9'; | ||
|
||
/** | ||
* The BigBlueButton server object. | ||
* | ||
* @var \sanduhrs\BigBlueButton\Server | ||
*/ | ||
public $server; | ||
|
||
/** | ||
* The BigBlueButton client object. | ||
* | ||
* @var \sanduhrs\BigBlueButton\Client | ||
*/ | ||
public $client; | ||
|
||
|
||
/** | ||
* BigBlueButton constructor. | ||
* | ||
* @param string $url | ||
* @param string $secret | ||
* @param string $endpoint | ||
*/ | ||
public function __construct( | ||
$url, | ||
$secret, | ||
$endpoint | ||
) { | ||
$this->client = new Client($url, $secret, $endpoint); | ||
$this->server = new Server($this->client); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Contains sanduhrs\BigBlueButton\Attendee. | ||
*/ | ||
|
||
namespace sanduhrs\BigBlueButton; | ||
|
||
/** | ||
* Class Attendee | ||
* | ||
* @package sanduhrs\BigBlueButton | ||
*/ | ||
class Attendee | ||
{ | ||
/** | ||
* The user ID. | ||
* | ||
* @var string | ||
*/ | ||
public $userID; | ||
|
||
/** | ||
* The full user name. | ||
* | ||
* @var string | ||
*/ | ||
public $fullName; | ||
|
||
/** | ||
* The user role. | ||
* | ||
* @var string | ||
*/ | ||
public $role; | ||
|
||
/** | ||
* Custom user data. | ||
* | ||
* @var array | ||
*/ | ||
public $customdata; | ||
|
||
/** | ||
* Attendee constructor. | ||
* | ||
* @param string $userID | ||
* @param string $fullName | ||
* @param string $role | ||
* @param array $customdata | ||
*/ | ||
public function __construct( | ||
$userID, | ||
$fullName, | ||
$role, | ||
$customdata = [] | ||
) { | ||
$this->userID = $userID; | ||
$this->fullName = $fullName; | ||
$this->role = $role; | ||
$this->customdata = $customdata; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace sanduhrs\BigBlueButton; | ||
|
||
use Exception; | ||
|
||
class BigBlueButtonException extends Exception | ||
{ | ||
} |
Oops, something went wrong.