src/Api/Translation.php
public function indexKey(string $projectKey, string $keyId, array $params = [])
    {
        if (isset($params['tags'])) {
            $params['q'] = 'tags:'.$params['tags'];
            unset($params['tags']);
        }

        $response = $this->httpGet(sprintf('/api/v2/projects/%s/keys/%s/translations', $projectKey, $keyId), $params);

        if (!$this->hydrator) {
            return $response;
        }

        if ($response->getStatusCode() !== 200 && $response->getStatusCode() !== 201) {
            $this->handleErrors($response);
        }

        return $this->hydrator->hydrate($response, Index::class);
    }
public function indexKey(string $projectKey, string $keyId, array $params = [])
    {
        if (isset($params['tags'])) {
            $params['q'] = 'tags:'.$params['tags'];
            unset($params['tags']);
        }

        $response = $this->httpGet(sprintf('/api/v2/projects/%s/keys/%s/translations', $projectKey, $keyId), $params);

        if (!$this->hydrator) {
            return $response;
        }

        if ($response->getStatusCode() !== 200 && $response->getStatusCode() !== 201) {
            $this->handleErrors($response);
        }

        return $this->hydrator->hydrate($response, Index::class);
    }
public function indexKey ( string $ projectKey , string $ keyId , array $ params = [ ] ) { if ( isset ( $ params [ 'tags' ] ) ) { $ params [ 'q' ] = 'tags:' . $ params [ 'tags' ] ; unset ( $ params [ 'tags' ] ) ; } $ response = $ this -> httpGet ( sprintf ( '/api/v2/projects/%s/keys/%s/translations' , $ projectKey , $ keyId ) , $ params ) ; if ( ! $ this -> hydrator ) { return $ response ; } if ( $ response -> getStatusCode ( ) !== 200 && $ response -> getStatusCode ( ) !== 201 ) { $ this -> handleErrors ( $ response ) ; } return $ this -> hydrator -> hydrate ( $ response , Index :: class ) ; }
List translations for a specific key.

@param string $projectKey
@param string $keyId
@param array  $params

@return Index|ResponseInterface
List translations for a specific key .