PHP code example of keyteqlabs / keymedia

1. Go to this page and download the library: Download keyteqlabs/keymedia library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

keyteqlabs / keymedia example snippets


$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');

$albums = $client->listAlbums();

// List album content
$mediaArray = $client->getAlbum('albumName');

// Search within album
$mediaArray = $client->getAlbum('albumName', 'searchTerm');

$mediaArray = $client->findMedia('searchTerm');

$media = $client->getMedia('id');

$type = $media->getType();
$isImage = $media->isImage();
$url = $media->getUrl();
$thumbnailUrl = $media->getThumbnailUrl($width, $height);