PHP code example of springimport / swagger-magento2-client

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

    

springimport / swagger-magento2-client example snippets


    


_instance = new SpringImport\Swagger\Magento2\Client\Api\BackendModuleServiceV1Api();

try {
    $result = $api_instance->backendModuleServiceV1GetModulesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BackendModuleServiceV1Api->backendModuleServiceV1GetModulesGet: ', $e->getMessage(), PHP_EOL;
}