ProjectApi.php in TMGMT Translator Smartling 8.4
File
vendor/smartling/api-sdk-php/src/Project/ProjectApi.php
View source
<?php
namespace Smartling\Project;
use Psr\Log\LoggerInterface;
use Smartling\AuthApi\AuthApiInterface;
use Smartling\BaseApiAbstract;
use Smartling\Exceptions\SmartlingApiException;
class ProjectApi extends BaseApiAbstract {
const ENDPOINT_URL = 'https://api.smartling.com/projects-api/v2/projects';
public static function create(AuthApiInterface $authProvider, $projectId, $logger = null) {
$client = self::initializeHttpClient(self::ENDPOINT_URL);
$instance = new self($projectId, $client, $logger, self::ENDPOINT_URL);
$instance
->setAuth($authProvider);
return $instance;
}
public function getProjectDetails() {
$requestData = $this
->getDefaultRequestData('query', []);
return $this
->sendRequest('', $requestData, self::HTTP_METHOD_GET);
}
}