Skip to content

Latest commit

 

History

History
113 lines (80 loc) · 3.56 KB

CloudflareApi.md

File metadata and controls

113 lines (80 loc) · 3.56 KB

Yoast\MyYoastApiClient\CloudflareApi

All URIs are relative to https://my.yoast.test

Method HTTP request Description
purgeKVStore POST /api/cloudflare/kv/registered-domains/purge Purge kv pairs from the registered domains key value store in Cloudflare
updateAll POST /api/cloudflare/kv/registered-domains/update-all Update sites in the registered domains key value store in Cloudflare

purgeKVStore

object[] purgeKVStore($body)

Purge kv pairs from the registered domains key value store in Cloudflare

Example

<?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\CloudflareApi(
    // 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\PurgeKVRequestDto(); // \Yoast\MyYoastApiClient\Model\PurgeKVRequestDto | 

try {
    $result = $apiInstance->purgeKVStore($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CloudflareApi->purgeKVStore: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\PurgeKVRequestDto

Return type

object[]

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateAll

object updateAll($body)

Update sites in the registered domains key value store in Cloudflare

Example

<?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\CloudflareApi(
    // 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\UpdateAllKVRequestDto(); // \Yoast\MyYoastApiClient\Model\UpdateAllKVRequestDto | 

try {
    $result = $apiInstance->updateAll($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CloudflareApi->updateAll: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\UpdateAllKVRequestDto

Return type

object

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]