PHP code example of djthossi / shipcloud-sdk

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

    

djthossi / shipcloud-sdk example snippets



declare(strict_types=1);
namespace App\Controller;

use DjThossi\ShipcloudSdk\Api\MeApi;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;

class DefaultController extends AbstractController
{
    #[Route('/', name: 'homepage', methods: ['GET'])]
    public function index(MeApi $meApi): Response {
        var_dump($meApi->show()->getBodyAsArray());

        //...
    }
}