1. Go to this page and download the library: Download digitalkaoz/versioneye-php 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/ */
digitalkaoz / versioneye-php example snippets
use Rs\VersionEye\Client;
$api = (new Client())->api('services'); // Rs\VersionEye\Api\Services
$api->ping(); //array
//other implemented APIs
$api = (new Client())->api('github'); // Rs\VersionEye\Api\Github
$api = (new Client())->api('me'); // Rs\VersionEye\Api\Me
$api = (new Client())->api('projects'); // Rs\VersionEye\Api\Projects
$api = (new Client())->api('products'); // Rs\VersionEye\Api\Products
$api = (new Client())->api('sessions'); // Rs\VersionEye\Api\Sessions
$api = (new Client())->api('users'); // Rs\VersionEye\Api\Users
class MyHttpClient implements HttpClient
{
/**
* @inheritDoc
*/
public function request($method, $url, array $params = [])
{
//implement your own special http handling here
}
}
$api = (new Client(new MyHttpClient))->api('users');
namespace Rs\VersionEye\Api;
class Foo implements Api
{
/**
* awesome api endpoint
*/
public function bar($bar, $bazz=1)
{
//implement api endpoint
}
}
class CommandFactory
{
/**
* generates Commands from all Api Methods
*
* @param array $classes
* @return Command[]
*/
public function generateCommands(array $classes = [])
{
$classes = $classes ?: [
//...
'Rs\VersionEye\Api\Foo'
];
}
}
namespace Rs\VersionEye\Output;
class Foo
{
public function bar(OutputInterface $output, $response)
{
//output the $response (API Result)
}
}