venatus / xmaven-php-sdk
PHP Wrapper for Xmaven Remote Web Services
Requires
- php: >=5.3.0
- ext-curl: *
- guzzlehttp/guzzle: ~5.0
Requires (Dev)
- phpunit/phpunit: 4.*
Suggests
- ext-apc: Allows opcode caching
This package is not auto-updated.
Last update: 2022-12-10 08:23:29 UTC
README
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