Skip to content
KeyMedia PHP API wrapper
PHP Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/Keyteq/Keymedia
tests/Keyteq/Keymedia
.gitignore
.ruby-gemset
.ruby-version
.travis.yml
Gemfile
Gemfile.lock
Guardfile
LICENSE
README.md
composer.json
phpunit.xml

README.md

keymedia-php

KeyMedia PHP API wrapper

Build Status Latest Stable Version

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);
You can’t perform that action at this time.