PHP code example of gubee-marketplace / php-sdk

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

    

gubee-marketplace / php-sdk example snippets




use Gubee\SDK\Client;

$client = (new Client())
    ->authenticate('your-token');



use Gubee\SDK\Client;

$client = (new Client())
    ->authenticate('your-token');

$token = $client->token()->revalidate('your-token');

echo $token->getSellerId();



use Gubee\SDK\Client;
use Gubee\SDK\Resource\PlatformResource;

$client = (new Client())
    ->authenticate('your-token');

$platforms = (new PlatformResource($client))->configuration();



use Gubee\SDK\Client;
use Gubee\SDK\Resource\Catalog\ProductResource;

$client = (new Client())
    ->authenticate('your-token');

$product = (new ProductResource($client))->loadById('product-id');

echo $product->getId();



use Gubee\SDK\Client;

$client = (new Client())
    ->authenticate('your-token');

$client->token()->revalidate('your-token');

$response = $client->getLastResponse();
bash
composer