Download the PHP package media-manager/media-manager-api-php without Composer
On this page you can find all versions of the php package media-manager/media-manager-api-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download media-manager/media-manager-api-php
More information about media-manager/media-manager-api-php
Files in media-manager/media-manager-api-php
Package media-manager-api-php
Short Description A PHP Library for interacting with the Media Manager APIs.
License
Informations about the package media-manager-api-php
Media Manager API - PHP
A PHP library for interacting with the Media Manager APIs.
Installing
The library can be installed via Composer. Simply include the library in your require block in composer.json
.
And then run the composer install
Now you can require the autoload
.
Client
You can get your client data by using the getClient
method.
Templates
Getting all templates
You can get all templates attached to your account.
Playlists
Getting all playlists
You can get all playlists attached to your account.
Videos
You can get all your videos or a single video.
Getting all videos
Getting a video
External
Media Manager has a number of external APIs. These are mainly used for Javascript based calls, but can still be called via PHP using this library.
Templates
Searching videos
You can search all videos on a given external template. You can pass up to 25 terms
to search against (as an array). The search is purformed on titles
, descriptions
and tags
.
Most viewed videos
Recommend videos
You can use the recommend API to get recommendations based on a video you pass.
Latest videos
Get the latest videos on template
Get video on template
Get a video details thats published to template.
Get videos on template
Get all videos on template.
Get audios on template
Get all audios on template.
Playlists
All these playlist APIS will require a templateID
also. They allow you filter down videos that appear in a playlist and also a external template.
Get videos in playlist
Get all videos published to a playlist
Get audios in playlist
Get all audios published to a playlist
Get video in playlist
Get video published to a playlist
Get audio in playlist
Get audio published to a playlist
Analytics
You can also query your analytics.
Query Builder
You can also make use of the Query Builder.
You can then pass this into the Query
method.
This will perform the most simple query, which would be SHOW Video
. You can build on the query builder and add conditions and so on.
The default SHOW
is for videos, but you can change it by calling the Show()
method.
Adding condition
By default the conditon will use the opreator IS
. This can be changed by passing a third parameter.
When you have more than one conditon on a query a operator is used to seperate them. There are two options AND
, OR
. By default AND
is used. This can be changed by setting the Logical
method.
Filtering
You can also filter down the content returned by the API.
So this filter allows you to only return videos that are published to a given template. You can continue to add other filters.
So now we only want to return videos that are published to a given template, but also published to a given playlist.
Paging
Some API calls will return paged content. So the getVideos
method will be returned as a MediaManager\Pager\Pager
object. This can be easily iterated using a simple loop.
Pager filters
Sometimes you may want to change the pager filters. For instance if you wanted to limit the number of items returned.