All URIs are relative to https://my.yoast.test
Method | HTTP request | Description |
---|---|---|
addSubscription | PUT /api/Sites/{id}/subscriptions | Adds a subscription to a site |
current | GET /api/Sites/current | Get the current connected site for an access token. |
currentClone | GET /api/Sites/info | Get the current connected site for a URL. |
deleteOne | DELETE /api/Sites/{id} | |
getMany | GET /api/Sites | Get sites |
getManyPaged | GET /api/Sites/paged | Get sites |
getOne | GET /api/Sites/{id} | Get a site |
index | POST /api/Sites/index | |
removeSubscription | DELETE /api/Sites/{id}/subscriptions/{subscriptionId} | Removes a subscription from a site |
switchSubscription | POST /api/Sites/switchSubscription | Switches the subscription for a number of times. |
switchSubscriptionNumberOfTimes | POST /api/Sites/switchSubscriptionNumberOfTimes | Switches the subscription for a number of times. |
updateOne | PATCH /api/Sites/{id} | |
updateSiteUrl | PATCH /api/Sites/{id}/url |
\Yoast\MyYoastApiClient\Model\Site addSubscription($body, $id)
Adds a subscription to a 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\SiteApi(
// 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\AddSubscriptionDto(); // \Yoast\MyYoastApiClient\Model\AddSubscriptionDto |
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string |
try {
$result = $apiInstance->addSubscription($body, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SiteApi->addSubscription: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\AddSubscriptionDto | ||
id | string |
\Yoast\MyYoastApiClient\Model\Site
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto current()
Get the current connected site for an access 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\SiteApi(
// 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
);
try {
$result = $apiInstance->current();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SiteApi->current: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto currentClone()
Get the current connected site for a URL.
<?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\SiteApi(
// 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
);
try {
$result = $apiInstance->currentClone();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SiteApi->currentClone: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteOne($id)
<?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\SiteApi(
// 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 {
$apiInstance->deleteOne($id);
} catch (Exception $e) {
echo 'Exception when calling SiteApi->deleteOne: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string |
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]
\Yoast\MyYoastApiClient\Model\Site[] getMany($filter)
Get sites
Get and filter 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\SiteApi(
// 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 SiteApi->getMany: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
filter | object | Used for filtering/joining the results. | [optional] |
\Yoast\MyYoastApiClient\Model\Site[]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getManyPaged($filter)
Get sites
Get and filter 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\SiteApi(
// 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 {
$apiInstance->getManyPaged($filter);
} catch (Exception $e) {
echo 'Exception when calling SiteApi->getManyPaged: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
filter | object | Used for filtering/joining the results. | [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]
\Yoast\MyYoastApiClient\Model\Site getOne($id, $filter)
Get a site
Get 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\SiteApi(
// 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 |
$filter = new \stdClass; // object | Used for filtering/joining the results.
try {
$result = $apiInstance->getOne($id, $filter);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SiteApi->getOne: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string | ||
filter | object | Used for filtering/joining the results. | [optional] |
\Yoast\MyYoastApiClient\Model\Site
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto index($token, $url, $method)
<?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\SiteApi(
// 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
);
$token = "token_example"; // string |
$url = "url_example"; // string |
$method = "method_example"; // string |
try {
$result = $apiInstance->index($token, $url, $method);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SiteApi->index: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
token | string | ||
url | string | ||
method | string |
\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\Site removeSubscription($id, $subscriptionId)
Removes a subscription from a 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\SiteApi(
// 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 |
$subscriptionId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string |
try {
$result = $apiInstance->removeSubscription($id, $subscriptionId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SiteApi->removeSubscription: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string | ||
subscriptionId | string |
\Yoast\MyYoastApiClient\Model\Site
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
int switchSubscription($body)
Switches the subscription for a number of times.
Switches the subscription for a number of times.
<?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\SiteApi(
// 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\TransferSiteDto(); // \Yoast\MyYoastApiClient\Model\TransferSiteDto |
try {
$result = $apiInstance->switchSubscription($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SiteApi->switchSubscription: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\TransferSiteDto |
int
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto switchSubscriptionNumberOfTimes($body)
Switches the subscription for a number of times.
Switches the subscription for a number of times.
<?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\SiteApi(
// 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\SwitchSubscriptionNumberOfTimesDto(); // \Yoast\MyYoastApiClient\Model\SwitchSubscriptionNumberOfTimesDto |
try {
$result = $apiInstance->switchSubscriptionNumberOfTimes($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SiteApi->switchSubscriptionNumberOfTimes: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\SwitchSubscriptionNumberOfTimesDto |
\Yoast\MyYoastApiClient\Model\UnspecifiedResponseDto
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateOne($body, $id)
<?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\SiteApi(
// 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\UpdateSiteDto(); // \Yoast\MyYoastApiClient\Model\UpdateSiteDto |
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string |
try {
$apiInstance->updateOne($body, $id);
} catch (Exception $e) {
echo 'Exception when calling SiteApi->updateOne: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\UpdateSiteDto | ||
id | string |
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]
updateSiteUrl($body, $id)
<?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\SiteApi(
// 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\UpdateSiteUrlDto(); // \Yoast\MyYoastApiClient\Model\UpdateSiteUrlDto |
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string |
try {
$apiInstance->updateSiteUrl($body, $id);
} catch (Exception $e) {
echo 'Exception when calling SiteApi->updateSiteUrl: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\UpdateSiteUrlDto | ||
id | string |
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]