Skip to content

Latest commit

 

History

History
109 lines (76 loc) · 3 KB

EDDApi.md

File metadata and controls

109 lines (76 loc) · 3 KB

Yoast\MyYoastApiClient\EDDApi

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

Method HTTP request Description
handleGetRequest GET /edd-sl-api Activate or deactivate a site license
handlePostRequest POST /edd-sl-api

handleGetRequest

handleGetRequest($eddAction, $url, $itemName)

Activate or deactivate a site license

Used for legacy EDD license checks.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\EDDApi(
    // 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()
);
$eddAction = "eddAction_example"; // string | 
$url = "url_example"; // string | 
$itemName = "itemName_example"; // string | 

try {
    $apiInstance->handleGetRequest($eddAction, $url, $itemName);
} catch (Exception $e) {
    echo 'Exception when calling EDDApi->handleGetRequest: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
eddAction string
url string
itemName string

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

handlePostRequest

handlePostRequest($body, $eddAction)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Yoast\MyYoastApiClient\Api\EDDApi(
    // 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()
);
$body = new \Yoast\MyYoastApiClient\Model\EddDTO(); // \Yoast\MyYoastApiClient\Model\EddDTO | 
$eddAction = "eddAction_example"; // string | 

try {
    $apiInstance->handlePostRequest($body, $eddAction);
} catch (Exception $e) {
    echo 'Exception when calling EDDApi->handlePostRequest: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\EddDTO
eddAction string

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

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

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