PHP code example of rokka / client

1. Go to this page and download the library: Download rokka/client 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/ */

    

rokka / client example snippets


use Rokka\Client\Factory;

$apiKey = 'myKey';

$userClient = Factory::getUserClient($organization = null, $apiKey =null, $options = []);
$userClient->setCredentials($apiKey);

use Rokka\Client\Factory;

$organization = 'testorganization';
$apiKey = 'myKey';

$imageClient = Factory::getImageClient($organization, $apiKey);

[ 
   Factory::API_BASE_URL => 'https://some-other-api.rokka.io',
   Factory::RENDER_BASE_URL => 'https://myimages.example.com', // you you want/have another render base url
   Factory::PROXY => 'http://proxy:8888', // if you need to use a proxy
   Factory::GUZZLE_OPTIONS => ['verify' => false] // any guzzle option you need/want
]