venatus/xmaven-php-sdk

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP Wrapper for Xmaven Remote Web Services

0.11 2015-05-11 15:30 UTC

This package is not auto-updated.

Last update: 2022-12-10 08:23:29 UTC


README

@XmavenVideo on Twitter

This library has been created for PHP developers using the Xmaven platform. It provides a very lightweight wrapper to communicate with Xmaven API. Getting started could not be easier, find our package on packagist: https://packagist.org/packages/venatus/xmaven-php-sdk

Install by adding { .. "venatus/xmaven-php-sdk": "0.1" .. } to your composer.json file.

The wrapper creates a Guzzle request object. This can be used to further extends the library where required. More information about Guzzle can be found here: http://guzzle.readthedocs.org/en/latest/

Installing via Composer

The recommended way to install Guzzle is through Composer.

# Install Composer
curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest stable version of Guzzle:

composer.phar require venatus/xmaven-php-sdk

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';

PHP Examples

<?php
require 'vendor/autoload.php';

//Create instance of the API Wrapper
$xm = new Xmaven\API($userId, $privateKey);

//Get all media items
$res = $xm->makeRequest('GET','/v1/media');

//Get all media items, limit to just 5 returned.
$res = $xm->makeRequest('GET','/v1/media', array(
  'limit' => 5,
));

//Create a new media item
$res = $xm->makeRequest('POST','/v1/media',array(),array(
  'title' => 'test',
));
var_dump($res);

Documentation

More information can be found in the online documentation at https://docs.xmaven.com/api/01-installation