PHP code example of eurotext / rest-api-client
1. Go to this page and download the library: Download eurotext/rest-api-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/ */
eurotext / rest-api-client example snippets
// define your api key provided by Eurotext
$apiKey = 'myCustomAPIKey';
// create configuration with your key
$config = new Configuration();
$config->setApiKey($apiKey);
// instantiate project API object
$projectApi = new ProjectV1Api($config);
// create project data object
$projectData = new ProjectData('Project Description');
// create post request object with project data
$request = new ProjectPostRequest('Project Name', $projectData, ProjectTypeEnum::QUOTE());
// send request via project API's POST request
$response = $projectApi->post($request);
// retrieve API project id from result
$createdProjectId = $response->getId();