keyteqlabs / keymedia
Keymedia API wrapper in PHP
v1.3.1
2016-09-27 16:53 UTC
Requires
- php: >=5.3.0
- ext-curl: *
- mashape/unirest-php: 1.2.x
Requires (Dev)
- mikey179/vfsstream: dev-master
- mockery/mockery: dev-master
- phpunit/phpunit: 3.7.x
README
KeyMedia PHP API wrapper
Basic usage example
composer require keyteqlabs/keymedia
Initialize the client
$client = new Keyteq\Keymedia\KeymediaClient('username', 'keymediaURL', 'apiKey'); //In case you don't have the API key yet $client = new Keyteq\Keymedia\KeymediaClient('username', 'keymediaURL'); $client->getToken('password');
Working with albums
$albums = $client->listAlbums(); // List album content $mediaArray = $client->getAlbum('albumName'); // Search within album $mediaArray = $client->getAlbum('albumName', 'searchTerm');
Search by media / album names
$mediaArray = $client->findMedia('searchTerm');
Get a single media object by ID
$media = $client->getMedia('id');
Accessing media information
$type = $media->getType(); $isImage = $media->isImage(); $url = $media->getUrl(); $thumbnailUrl = $media->getThumbnailUrl($width, $height);