Skip to content

Commit

Permalink
Update to api version 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Auditor committed Jan 3, 2019
1 parent 796cb64 commit 444ebb1
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/BigBlueButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ class BigBlueButton
* @var string
* A version string.
*/
const VERSION = '0.6.0';
const VERSION = '0.7.0';

/**
* The BigBlueButton API version.
*
* @var string
* A version string.
*/
const API_VERSION = '1.0';
const API_VERSION = '1.1';

/**
* The BigBlueButton server object.
Expand Down
47 changes: 47 additions & 0 deletions src/BigBlueButton/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,53 @@ public function unpublishRecordings($recordIDs)
return true;
}

/**
* Update recording.
*
* Update a recording for a given recordID.
*
* @param string $recordID
* A record ID to apply the update action to.
*
* @return boolean
* The success status as TRUE.
*
* @throws \sanduhrs\BigBlueButton\Exception\BigBlueButtonException
*/
public function updateRecording($recordID) {
return $this->updateRecordings([$recordID]);
}

/**
* Update recordings.
*
* Update recordings for a set of record IDs.
*
* @param array $recordIDs
* A set of record IDs to apply the update action to.
*
* @return boolean
* The success status as TRUE.
*
* @throws \sanduhrs\BigBlueButton\Exception\BigBlueButtonException
*/
public function updateRecordings($recordIDs, $meta = []) {
$options = [
'recordID' => implode(',', $recordIDs),
];

if (count($recordIDs)) {
$options['recordID'] = implode(',', $recordIDs);
}

if (count($meta)) {
$options['meta'] = implode(',', $meta);
}

$this->client->get('updateRecordings', $options);
return true;
}

/**
* Delete recording.
*
Expand Down

0 comments on commit 444ebb1

Please sign in to comment.