PHP code example of smartbox / api-bundle

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

    

smartbox / api-bundle example snippets

 app/console smartbox:api:generateSDK --help
 app/console smartbox:api:export-list --help"
 app/console smartbox:api:export-list --export-dir "/tmp"
 app/console smartbox:api:export-list --async false --http-method GET
 app/console smartbox:api:export-list --async false --role ROLE_USER
 app/console smartbox:api:generate-soapui --help
 app/console smartbox:api:generate-soapui -f \"Product/sendProductInformation\" -p ganesh-tt-one17.smartbox-test.local"
 app/console smartbox:api:dumpPrintable

  php console.php config:dump-reference smartbox-api

  class APIController extends \Smartbox\ApiBundle\Controller\APIController
  {
      public function handleCallAction($serviceId, $serviceName, $methodConfig, $version, $methodName, $input)
      {

        // Checks authorization
        $this->checkAuthorization();

        // Check input
        $inputsConfig = $methodConfig['input'];
        $this->checkInput($version, $inputsConfig, $input);

        return $this->respond($response);
    }
  }