All URIs are relative to https://my.yoast.test
Method | HTTP request | Description |
---|---|---|
disable | POST /api/ComposerTokens/{id}/delete | Disable a composer token |
generate | POST /api/ComposerTokens/generate | Generates a Composer token |
rename | POST /api/ComposerTokens/{id}/rename | Renames a Composer token |
\Yoast\MyYoastApiClient\Model\ComposerToken disable($id)
Disable a composer token
Renders a single composer token unusable
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearer
$config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Yoast\MyYoastApiClient\Api\ComposerTokenApi(
// 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
);
$id = "id_example"; // string |
try {
$result = $apiInstance->disable($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ComposerTokenApi->disable: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string |
\Yoast\MyYoastApiClient\Model\ComposerToken
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\ComposerToken generate($body)
Generates a Composer token
Generates a personal token for the logged in customer that can be used to download our plugins with Composer.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearer
$config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Yoast\MyYoastApiClient\Api\ComposerTokenApi(
// 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
);
$body = new \Yoast\MyYoastApiClient\Model\GenerateDto(); // \Yoast\MyYoastApiClient\Model\GenerateDto |
try {
$result = $apiInstance->generate($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ComposerTokenApi->generate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\GenerateDto |
\Yoast\MyYoastApiClient\Model\ComposerToken
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\ComposerToken rename($body, $id)
Renames a Composer token
Changes the name of a Composer token
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearer
$config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Yoast\MyYoastApiClient\Api\ComposerTokenApi(
// 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
);
$body = new \Yoast\MyYoastApiClient\Model\RenameBodyDto(); // \Yoast\MyYoastApiClient\Model\RenameBodyDto |
$id = "id_example"; // string |
try {
$result = $apiInstance->rename($body, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ComposerTokenApi->rename: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\RenameBodyDto | ||
id | string |
\Yoast\MyYoastApiClient\Model\ComposerToken
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]