Skip to content

Files

Latest commit

0ff2843 · Jul 3, 2024

History

History
170 lines (119 loc) · 5.22 KB

ProductGroupApi.md

File metadata and controls

170 lines (119 loc) · 5.22 KB

Yoast\MyYoastApiClient\ProductGroupApi

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

Method HTTP request Description
getMany GET /api/ProductGroups Get productgroups
getReleaseDetails GET /api/ProductGroups/releaseDetails
updateDownload PATCH /api/ProductGroups/updateDownload Update the download

getMany

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

Get productgroups

Get and filter productgroups

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\ProductGroupApi(
    // 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 ProductGroupApi->getMany: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Yoast\MyYoastApiClient\Model\ProductGroup[]

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]

getReleaseDetails

\Yoast\MyYoastApiClient\Model\ReleaseDetailsDto getReleaseDetails($slug)

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\ProductGroupApi(
    // 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
);
$slug = "slug_example"; // string | The slug of the product group to get release details for.

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

Parameters

Name Type Description Notes
slug string The slug of the product group to get release details for.

Return type

\Yoast\MyYoastApiClient\Model\ReleaseDetailsDto

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]

updateDownload

\Yoast\MyYoastApiClient\Model\ProductGroup updateDownload($body)

Update the download

Set the passed downloadUrl and version to the passed product group.

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\ProductGroupApi(
    // 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\UpdateDownloadDto(); // \Yoast\MyYoastApiClient\Model\UpdateDownloadDto | 

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

Parameters

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

Return type

\Yoast\MyYoastApiClient\Model\ProductGroup

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]