Skip to content

Latest commit

 

History

History
227 lines (160 loc) · 6.53 KB

BlacklistApi.md

File metadata and controls

227 lines (160 loc) · 6.53 KB

Yoast\MyYoastApiClient\BlacklistApi

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

createOne

string createOne($body)

Creates a blacklisted site

Creates a single site

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\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;
}
?>

Parameters

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

Return type

string

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]

deleteOne

string deleteOne($id)

Remove a site from the blacklist

Deletes a single blacklisted site

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\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;
}
?>

Parameters

Name Type Description Notes
id string

Return type

string

Authorization

bearer

HTTP request headers

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

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

getMany

\Yoast\MyYoastApiClient\Model\Blacklist[] getMany($filter)

Gets blacklisted sites

Get and filter blacklisted sites

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\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;
}
?>

Parameters

Name Type Description Notes
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\Blacklist[]

Authorization

bearer

HTTP request headers

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

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

getManyPaged

\Yoast\MyYoastApiClient\Model\Blacklist[] getManyPaged($filter)

Gets blacklisted sites

Get and filter blacklisted sites

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\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;
}
?>

Parameters

Name Type Description Notes
filter object Used for filtering/joining the results. [optional]

Return type

\Yoast\MyYoastApiClient\Model\Blacklist[]

Authorization

bearer

HTTP request headers

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

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