You are here

class ProjectApi in TMGMT Translator Smartling 8.2

Same name in this branch
  1. 8.2 api-sdk-php/src/Project/ProjectApi.php \Smartling\Project\ProjectApi
  2. 8.2 vendor/smartling/api-sdk-php/src/Project/ProjectApi.php \Smartling\Project\ProjectApi
Same name and namespace in other branches
  1. 8.4 vendor/smartling/api-sdk-php/src/Project/ProjectApi.php \Smartling\Project\ProjectApi
  2. 8.3 vendor/smartling/api-sdk-php/src/Project/ProjectApi.php \Smartling\Project\ProjectApi

Class ProjectApi

@package Smartling\Project

Hierarchy

  • class \Smartling\Project\ProjectApi extends \Smartling\BaseApiAbstract

Expanded class hierarchy of ProjectApi

5 files declare their use of ProjectApi
ProjectApiFunctionalTest.php in api-sdk-php/tests/functional/ProjectApiFunctionalTest.php
ProjectApiFunctionalTest.php in vendor/smartling/api-sdk-php/tests/functional/ProjectApiFunctionalTest.php
ProjectApiTest.php in api-sdk-php/tests/unit/ProjectApiTest.php
ProjectApiTest.php in vendor/smartling/api-sdk-php/tests/unit/ProjectApiTest.php
SmartlingApiFactory.php in src/Smartling/SmartlingApiFactory.php
SmartlingApiFactory.php.

File

vendor/smartling/api-sdk-php/src/Project/ProjectApi.php, line 15

Namespace

Smartling\Project
View source
class ProjectApi extends BaseApiAbstract {
  const ENDPOINT_URL = 'https://api.smartling.com/projects-api/v2/projects';

  /**
   * @param AuthApiInterface $authProvider
   * @param string $projectId
   * @param LoggerInterface $logger
   *
   * @return ProjectApi
   */
  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;
  }

  /**
   * @return array
   * @throws SmartlingApiException
   */
  public function getProjectDetails() {
    $requestData = $this
      ->getDefaultRequestData('query', []);
    return $this
      ->sendRequest('', $requestData, self::HTTP_METHOD_GET);
  }

}

Members