All URIs are relative to https://api.phrase.com/v2
Method | HTTP request | Description |
---|---|---|
screenshotCreate | POST /projects/{project_id}/screenshots | Create a screenshot |
screenshotDelete | DELETE /projects/{project_id}/screenshots/{id} | Delete a screenshot |
screenshotShow | GET /projects/{project_id}/screenshots/{id} | Get a single screenshot |
screenshotUpdate | PATCH /projects/{project_id}/screenshots/{id} | Update a screenshot |
screenshotsList | GET /projects/{project_id}/screenshots | List screenshots |
\Phrase\Model\Screenshot screenshotCreate($project_id, $x_phrase_app_otp, $branch, $name, $description, $filename)
Create a screenshot
Create a new screenshot.
<?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\ScreenshotsApi(
// 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
);
$project_id = 'project_id_example'; // string | Project ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$branch = 'branch_example'; // string | specify the branch to use
$name = 'name_example'; // string | Name of the screenshot
$description = 'description_example'; // string | Description of the screenshot
$filename = "/path/to/file.txt"; // \SplFileObject | Screenshot file
try {
$result = $apiInstance->screenshotCreate($project_id, $x_phrase_app_otp, $branch, $name, $description, $filename);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScreenshotsApi->screenshotCreate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
branch | string | specify the branch to use | [optional] |
name | string | Name of the screenshot | [optional] |
description | string | Description of the screenshot | [optional] |
filename | \SplFileObject**\SplFileObject** | Screenshot file | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
screenshotDelete($project_id, $id, $x_phrase_app_otp, $branch)
Delete a screenshot
Delete an existing screenshot.
<?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\ScreenshotsApi(
// 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
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$branch = my-feature-branch; // string | specify the branch to use
try {
$apiInstance->screenshotDelete($project_id, $id, $x_phrase_app_otp, $branch);
} catch (Exception $e) {
echo 'Exception when calling ScreenshotsApi->screenshotDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
branch | string | specify the branch to use | [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\Screenshot screenshotShow($project_id, $id, $x_phrase_app_otp, $branch)
Get a single screenshot
Get details on a single screenshot for a given project.
<?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\ScreenshotsApi(
// 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
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
$branch = my-feature-branch; // string | specify the branch to use
try {
$result = $apiInstance->screenshotShow($project_id, $id, $x_phrase_app_otp, $branch);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScreenshotsApi->screenshotShow: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
branch | string | specify the branch to use | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\Screenshot screenshotUpdate($project_id, $id, $screenshot_update_parameters, $x_phrase_app_otp)
Update a screenshot
Update an existing screenshot.
<?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\ScreenshotsApi(
// 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
);
$project_id = 'project_id_example'; // string | Project ID
$id = 'id_example'; // string | ID
$screenshot_update_parameters = new \Phrase\Model\ScreenshotUpdateParameters(); // \Phrase\Model\ScreenshotUpdateParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->screenshotUpdate($project_id, $id, $screenshot_update_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScreenshotsApi->screenshotUpdate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project ID | |
id | string | ID | |
screenshot_update_parameters | \Phrase\Model\ScreenshotUpdateParameters | ||
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\Screenshot[] screenshotsList($project_id, $x_phrase_app_otp, $page, $per_page, $branch, $key_id)
List screenshots
List all screenshots for the given project.
<?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\ScreenshotsApi(
// 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
);
$project_id = 'project_id_example'; // string | Project 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
$branch = my-feature-branch; // string | specify the branch to use
$key_id = abcd1234cdef1234abcd1234cdef1234; // string | filter by key
try {
$result = $apiInstance->screenshotsList($project_id, $x_phrase_app_otp, $page, $per_page, $branch, $key_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ScreenshotsApi->screenshotsList: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | Project 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] |
branch | string | specify the branch to use | [optional] |
key_id | string | filter by key | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]