-
Notifications
You must be signed in to change notification settings - Fork 3
OcPlaylistsApi
This class contains all REST API calls to the /api/playlists
endpoint.
It is accessible under OpencastApi\Rest
namespace.
- In
OpencastApi\OpenCast
as its property with OpenCast properties naming convention:
use OpencastApi\OpenCast;
$opencastApi = new OpenCast($config);
$ocPlaylistsApi = $opencastApi->playlistsApi;
...
- Direct instantiation:
use OpencastApi\Rest\OcRestClient;
use OpencastApi\Rest\OcPlaylistsApi;
$ocRestClient = new OcRestClient($config);
$ocPlaylistsApi = new OcPlaylistsApi($ocRestClient);
...
Consumable functions are listed below:
Returns the list of playlists. Playlists that you do not have read access to will not show up. More Detail
-
$params
is an optional array that could contain the following:
[
'limit' => (int) {The maximum number of results to return for a single request},
'offset' => (int) {The index of the first result to return},
'sort' => {The sort criteria. A criteria is specified by a case-sensitive sort name and the order separated by a colon (e.g. updated:ASC). Supported sort names: 'updated'. Use the order ASC to sort ascending or DESC to sort descending.}
]
- Returns an array:
['code' => 200, 'body' => '{A (potentially empty) list of playlists}']
Returns a single playlist.
-
$playlistId
(string) the identifier of the playlist -
Returns an array:
['code' => 200, 'body' => '{The playlist (object)}']
Creates a playlist.
-
$playlist
(string|array) playlist data -
Returns an array:
['code' => 201, 'reason' => 'Created', 'body' => '{The new playlist (object)}']
Updates a playlist.
-
$playlistId
(string) the identifier of the playlist -
$playlist
(string|array) updated playlist data -
Returns an array:
['code' => 200, 'body' => '{The updated playlist (object)}']
Removes a playlist.
-
$playlistId
(string) the identifier of the playlist -
Returns an array:
['code' => 200, 'body' => '{The removed playlist (object)}']
Updates the entries of a playlist.
-
$playlistId
(string) the identifier of the playlist -
$playlistEntries
(string|array) the playlist entries -
Returns an array:
['code' => 200, 'body' => '{The updated playlist (object)}']
Removes all entries of the playlist.
-
$playlistId
(string) the identifier of the playlist -
Returns an array:
['code' => 200, 'body' => '{The updated playlist (object)}']