All URIs are relative to https://my.yoast.test
Method | HTTP request | Description |
---|---|---|
createOne | POST /api/Blacklist | Creates a blacklisted site |
deleteOne | DELETE /api/Blacklist/{id} | Remove a site from the blacklist |
getMany | GET /api/Blacklist | Gets blacklisted sites |
getManyPaged | GET /api/Blacklist/paged | Gets blacklisted sites |
string createOne($body)
Creates a blacklisted site
Creates a single site
<?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\BlacklistApi(
// 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\CreateBlacklistSiteDto(); // \Yoast\MyYoastApiClient\Model\CreateBlacklistSiteDto |
try {
$result = $apiInstance->createOne($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BlacklistApi->createOne: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\CreateBlacklistSiteDto |
string
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string deleteOne($id)
Remove a site from the blacklist
Deletes a single blacklisted site
<?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\BlacklistApi(
// 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 = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string |
try {
$result = $apiInstance->deleteOne($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BlacklistApi->deleteOne: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string |
string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\Blacklist[] getMany($filter)
Gets blacklisted sites
Get and filter blacklisted sites
<?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\BlacklistApi(
// 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
);
$filter = new \stdClass; // object | Used for filtering/joining the results.
try {
$result = $apiInstance->getMany($filter);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BlacklistApi->getMany: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
filter | object | Used for filtering/joining the results. | [optional] |
\Yoast\MyYoastApiClient\Model\Blacklist[]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\Blacklist[] getManyPaged($filter)
Gets blacklisted sites
Get and filter blacklisted sites
<?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\BlacklistApi(
// 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
);
$filter = new \stdClass; // object | Used for filtering/joining the results.
try {
$result = $apiInstance->getManyPaged($filter);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BlacklistApi->getManyPaged: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
filter | object | Used for filtering/joining the results. | [optional] |
\Yoast\MyYoastApiClient\Model\Blacklist[]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]