Skip to content

Latest commit

 

History

History
110 lines (77 loc) · 3.71 KB

AccountsApi.md

File metadata and controls

110 lines (77 loc) · 3.71 KB

Yoast\MyYoastApiClient\AccountsApi

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

Method HTTP request Description
checkUsername GET /api/accounts/checkUsername Username availability check
setTOTPTwoFactorConfig POST /api/accounts/{id}/TOTPTwoFactorConfig

checkUsername

\Yoast\MyYoastApiClient\Model\UsernameCheckResponseDto checkUsername($body, $xAccountAppSharedSecret)

Username availability check

Checks whether a username is still available

Example

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

$apiInstance = new Yoast\MyYoastApiClient\Api\AccountsApi(
    // 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\UsernameCheckRequestDto(); // \Yoast\MyYoastApiClient\Model\UsernameCheckRequestDto | 
$xAccountAppSharedSecret = "xAccountAppSharedSecret_example"; // string | The API shared secret

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

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\UsernameCheckRequestDto
xAccountAppSharedSecret string The API shared secret

Return type

\Yoast\MyYoastApiClient\Model\UsernameCheckResponseDto

Authorization

No authorization required

HTTP request headers

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

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

setTOTPTwoFactorConfig

setTOTPTwoFactorConfig($body, $xAccountAppSharedSecret, $id)

Example

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

$apiInstance = new Yoast\MyYoastApiClient\Api\AccountsApi(
    // 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\TOTPTwoFactorConfigDto(); // \Yoast\MyYoastApiClient\Model\TOTPTwoFactorConfigDto | 
$xAccountAppSharedSecret = "xAccountAppSharedSecret_example"; // string | The API shared secret
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | 

try {
    $apiInstance->setTOTPTwoFactorConfig($body, $xAccountAppSharedSecret, $id);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->setTOTPTwoFactorConfig: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\TOTPTwoFactorConfigDto
xAccountAppSharedSecret string The API shared secret
id 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]