1. Go to this page and download the library: Download wpcs/php-api-wrapper 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/ */
wpcs / php-api-wrapper example snippets
$request = new \WPCS\API\GetTenantsRequest();
$response = $request
->setRegion('us1') // Or eu1, depending on your region.
->setApiKey('an-api-key') // The API Key you retrieved from the console
->setApiSecret('an-api-secret') // The API Secret you retrieved from the console
->send();
define('WPCS_API_REGION', 'us1'); // Or eu1, depending on your region.
define('WPCS_API_KEY', 'an-api-key'); // The API Key you retrieved from the console
define('WPCS_API_SECRET', 'an-api-secret'); // The API Secret you retrieved from the console
// No need to set the region, API key and secret using functions now
$request = new \WPCS\API\GetTenantsRequest();
$response = $request->send();