All URIs are relative to https://api.phrase.com/v2
Method | HTTP request | Description |
---|---|---|
spaceCreate | POST /accounts/{account_id}/spaces | Create a Space |
spaceDelete | DELETE /accounts/{account_id}/spaces/{id} | Delete Space |
spaceShow | GET /accounts/{account_id}/spaces/{id} | Get Space |
spaceUpdate | PATCH /accounts/{account_id}/spaces/{id} | Update Space |
spacesList | GET /accounts/{account_id}/spaces | List Spaces |
spacesProjectsCreate | POST /accounts/{account_id}/spaces/{space_id}/projects | Add Project to Space |
spacesProjectsDelete | DELETE /accounts/{account_id}/spaces/{space_id}/projects/{id} | Remove Project from Space |
spacesProjectsList | GET /accounts/{account_id}/spaces/{space_id}/projects | List Projects in Space |
\Phrase\Model\Space spaceCreate($account_id, $space_create_parameters, $x_phrase_app_otp)
Create a Space
Create a new Space.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\SpacesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$account_id = 'account_id_example'; // string | Account ID
$space_create_parameters = new \Phrase\Model\SpaceCreateParameters(); // \Phrase\Model\SpaceCreateParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->spaceCreate($account_id, $space_create_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SpacesApi->spaceCreate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
account_id | string | Account ID | |
space_create_parameters | \Phrase\Model\SpaceCreateParameters | ||
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
spaceDelete($account_id, $id, $x_phrase_app_otp)
Delete Space
Delete the specified Space.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\SpacesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$account_id = 'account_id_example'; // string | Account ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$apiInstance->spaceDelete($account_id, $id, $x_phrase_app_otp);
} catch (Exception $e) {
echo 'Exception when calling SpacesApi->spaceDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
account_id | string | Account ID | |
id | string | ID | |
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\Space spaceShow($account_id, $id, $x_phrase_app_otp)
Get Space
Show the specified Space.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\SpacesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$account_id = 'account_id_example'; // string | Account ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->spaceShow($account_id, $id, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SpacesApi->spaceShow: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
account_id | string | Account ID | |
id | string | ID | |
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\Space spaceUpdate($account_id, $id, $space_update_parameters, $x_phrase_app_otp)
Update Space
Update the specified Space.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\SpacesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$account_id = 'account_id_example'; // string | Account ID
$id = 'id_example'; // string | ID
$space_update_parameters = new \Phrase\Model\SpaceUpdateParameters(); // \Phrase\Model\SpaceUpdateParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->spaceUpdate($account_id, $id, $space_update_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SpacesApi->spaceUpdate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
account_id | string | Account ID | |
id | string | ID | |
space_update_parameters | \Phrase\Model\SpaceUpdateParameters | ||
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\Space[] spacesList($account_id, $x_phrase_app_otp, $page, $per_page)
List Spaces
List all Spaces for the given account.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\SpacesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$account_id = 'account_id_example'; // string | Account ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$page = 1; // int | Page number
$per_page = 25; // int | Limit on the number of objects to be returned, between 1 and 100. 25 by default
try {
$result = $apiInstance->spacesList($account_id, $x_phrase_app_otp, $page, $per_page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SpacesApi->spacesList: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
account_id | string | Account ID | |
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
page | int | Page number | [optional] |
per_page | int | Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
spacesProjectsCreate($account_id, $space_id, $spaces_projects_create_parameters, $x_phrase_app_otp)
Add Project to Space
Adds an existing project to the space.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\SpacesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$account_id = 'account_id_example'; // string | Account ID
$space_id = 'space_id_example'; // string | Space ID
$spaces_projects_create_parameters = new \Phrase\Model\SpacesProjectsCreateParameters(); // \Phrase\Model\SpacesProjectsCreateParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$apiInstance->spacesProjectsCreate($account_id, $space_id, $spaces_projects_create_parameters, $x_phrase_app_otp);
} catch (Exception $e) {
echo 'Exception when calling SpacesApi->spacesProjectsCreate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
account_id | string | Account ID | |
space_id | string | Space ID | |
spaces_projects_create_parameters | \Phrase\Model\SpacesProjectsCreateParameters | ||
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
spacesProjectsDelete($account_id, $space_id, $id, $x_phrase_app_otp)
Remove Project from Space
Removes a specified project from the specified space.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\SpacesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$account_id = 'account_id_example'; // string | Account ID
$space_id = 'space_id_example'; // string | Space ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$apiInstance->spacesProjectsDelete($account_id, $space_id, $id, $x_phrase_app_otp);
} catch (Exception $e) {
echo 'Exception when calling SpacesApi->spacesProjectsDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
account_id | string | Account ID | |
space_id | string | Space ID | |
id | string | ID | |
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\Project[] spacesProjectsList($account_id, $space_id, $x_phrase_app_otp, $page, $per_page)
List Projects in Space
List all projects for the specified Space.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');
$apiInstance = new Phrase\Api\SpacesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$account_id = 'account_id_example'; // string | Account ID
$space_id = 'space_id_example'; // string | Space ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$page = 1; // int | Page number
$per_page = 25; // int | Limit on the number of objects to be returned, between 1 and 100. 25 by default
try {
$result = $apiInstance->spacesProjectsList($account_id, $space_id, $x_phrase_app_otp, $page, $per_page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SpacesApi->spacesProjectsList: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
account_id | string | Account ID | |
space_id | string | Space ID | |
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
page | int | Page number | [optional] |
per_page | int | Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]