PHP code example of gregorybiter / remonline-sdk

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

    

gregorybiter / remonline-sdk example snippets




use Gbit\Remonline\RemonlineClient;
use Gbit\Remonline\Order;

// Initialize with your API key
$api = new RemonlineClient("your_api_key_here");

$order = new Order($api);
$orderRequest = $order->getOrders();

use Gbit\Remonline\Api;

$api = new Api('your_api_key_here');

// GET request example
$tasks = $api->api('tasks', ['page' => 1], 'GET');

// POST request example  
$newTask = [
    'title' => 'New Task',
    'description' => 'Created via API'
];
$result = $api->api('tasks', $newTask, 'POST');

try {
    $result = $api->api('tasks', [], 'GET');
} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}