Skip to content

Commit dec579b

Browse files
committed
Auto-generate wrapper from updated spec
1 parent 8b39921 commit dec579b

2 files changed

Lines changed: 52 additions & 18 deletions

File tree

docs/Api/ResourcesDiscoveryApi.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ try {
8282
## `getResourcesDiscoverResources()`
8383

8484
```php
85-
getResourcesDiscoverResources($category_id, $with, $filters, $resource_ids, $page, $per_page, $no_dependencies): \OpenAPI\Client\Model\GetResourcesDiscoverResources200Response
85+
getResourcesDiscoverResources($category_id, $with, $filters, $resource_ids, $page, $per_page, $no_dependencies, $excluded_resource_ids, $excluded_creator_ids): \OpenAPI\Client\Model\GetResourcesDiscoverResources200Response
8686
```
8787

8888
Fetch a list of resources
@@ -114,10 +114,12 @@ $filters = array('key' => new \stdClass); // object | A list of dynamic filters
114114
$resource_ids = 'resource_ids_example'; // string | A comma-separated list of resource IDs to filter on.
115115
$page = 1; // int | The page number to return.
116116
$per_page = 25; // float | The number of resources to return per page.
117-
$no_dependencies = True; // bool
117+
$no_dependencies = True; // bool | Whether or not to exclude resources with dependencies listed.
118+
$excluded_resource_ids = 'excluded_resource_ids_example'; // string | A comma-separated list of resource IDs to exclude. No filter will be applied if empty.
119+
$excluded_creator_ids = 'excluded_creator_ids_example'; // string | A comma-separated list of creator IDs to exclude. No filter will be applied if empty.
118120

119121
try {
120-
$result = $apiInstance->getResourcesDiscoverResources($category_id, $with, $filters, $resource_ids, $page, $per_page, $no_dependencies);
122+
$result = $apiInstance->getResourcesDiscoverResources($category_id, $with, $filters, $resource_ids, $page, $per_page, $no_dependencies, $excluded_resource_ids, $excluded_creator_ids);
121123
print_r($result);
122124
} catch (Exception $e) {
123125
echo 'Exception when calling ResourcesDiscoveryApi->getResourcesDiscoverResources: ', $e->getMessage(), PHP_EOL;
@@ -134,7 +136,9 @@ try {
134136
| **resource_ids** | **string**| A comma-separated list of resource IDs to filter on. | [optional] |
135137
| **page** | **int**| The page number to return. | [optional] [default to 1] |
136138
| **per_page** | **float**| The number of resources to return per page. | [optional] [default to 25] |
137-
| **no_dependencies** | **bool**| | [optional] |
139+
| **no_dependencies** | **bool**| Whether or not to exclude resources with dependencies listed. | [optional] |
140+
| **excluded_resource_ids** | **string**| A comma-separated list of resource IDs to exclude. No filter will be applied if empty. | [optional] |
141+
| **excluded_creator_ids** | **string**| A comma-separated list of creator IDs to exclude. No filter will be applied if empty. | [optional] |
138142

139143
### Return type
140144

lib/Api/ResourcesDiscoveryApi.php

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -483,16 +483,18 @@ public function getResourcesDiscoverCategoriesRequest($category_id = null, $with
483483
* @param string $resource_ids A comma-separated list of resource IDs to filter on. (optional)
484484
* @param int $page The page number to return. (optional, default to 1)
485485
* @param float $per_page The number of resources to return per page. (optional, default to 25)
486-
* @param bool $no_dependencies no_dependencies (optional)
486+
* @param bool $no_dependencies Whether or not to exclude resources with dependencies listed. (optional)
487+
* @param string $excluded_resource_ids A comma-separated list of resource IDs to exclude. No filter will be applied if empty. (optional)
488+
* @param string $excluded_creator_ids A comma-separated list of creator IDs to exclude. No filter will be applied if empty. (optional)
487489
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getResourcesDiscoverResources'] to see the possible values for this operation
488490
*
489491
* @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format
490492
* @throws \InvalidArgumentException
491493
* @return \OpenAPI\Client\Model\GetResourcesDiscoverResources200Response|\OpenAPI\Client\Model\GetResourcesDiscoverResources4XXResponse|\OpenAPI\Client\Model\GetResourcesDiscoverResources4XXResponse
492494
*/
493-
public function getResourcesDiscoverResources($category_id = null, $with = null, $filters = null, $resource_ids = null, $page = 1, $per_page = 25, $no_dependencies = null, string $contentType = self::contentTypes['getResourcesDiscoverResources'][0])
495+
public function getResourcesDiscoverResources($category_id = null, $with = null, $filters = null, $resource_ids = null, $page = 1, $per_page = 25, $no_dependencies = null, $excluded_resource_ids = null, $excluded_creator_ids = null, string $contentType = self::contentTypes['getResourcesDiscoverResources'][0])
494496
{
495-
list($response) = $this->getResourcesDiscoverResourcesWithHttpInfo($category_id, $with, $filters, $resource_ids, $page, $per_page, $no_dependencies, $contentType);
497+
list($response) = $this->getResourcesDiscoverResourcesWithHttpInfo($category_id, $with, $filters, $resource_ids, $page, $per_page, $no_dependencies, $excluded_resource_ids, $excluded_creator_ids, $contentType);
496498
return $response;
497499
}
498500

@@ -507,16 +509,18 @@ public function getResourcesDiscoverResources($category_id = null, $with = null,
507509
* @param string $resource_ids A comma-separated list of resource IDs to filter on. (optional)
508510
* @param int $page The page number to return. (optional, default to 1)
509511
* @param float $per_page The number of resources to return per page. (optional, default to 25)
510-
* @param bool $no_dependencies (optional)
512+
* @param bool $no_dependencies Whether or not to exclude resources with dependencies listed. (optional)
513+
* @param string $excluded_resource_ids A comma-separated list of resource IDs to exclude. No filter will be applied if empty. (optional)
514+
* @param string $excluded_creator_ids A comma-separated list of creator IDs to exclude. No filter will be applied if empty. (optional)
511515
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getResourcesDiscoverResources'] to see the possible values for this operation
512516
*
513517
* @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format
514518
* @throws \InvalidArgumentException
515519
* @return array of \OpenAPI\Client\Model\GetResourcesDiscoverResources200Response|\OpenAPI\Client\Model\GetResourcesDiscoverResources4XXResponse|\OpenAPI\Client\Model\GetResourcesDiscoverResources4XXResponse, HTTP status code, HTTP response headers (array of strings)
516520
*/
517-
public function getResourcesDiscoverResourcesWithHttpInfo($category_id = null, $with = null, $filters = null, $resource_ids = null, $page = 1, $per_page = 25, $no_dependencies = null, string $contentType = self::contentTypes['getResourcesDiscoverResources'][0])
521+
public function getResourcesDiscoverResourcesWithHttpInfo($category_id = null, $with = null, $filters = null, $resource_ids = null, $page = 1, $per_page = 25, $no_dependencies = null, $excluded_resource_ids = null, $excluded_creator_ids = null, string $contentType = self::contentTypes['getResourcesDiscoverResources'][0])
518522
{
519-
$request = $this->getResourcesDiscoverResourcesRequest($category_id, $with, $filters, $resource_ids, $page, $per_page, $no_dependencies, $contentType);
523+
$request = $this->getResourcesDiscoverResourcesRequest($category_id, $with, $filters, $resource_ids, $page, $per_page, $no_dependencies, $excluded_resource_ids, $excluded_creator_ids, $contentType);
520524

521525
try {
522526
$options = $this->createHttpClientOption();
@@ -641,15 +645,17 @@ public function getResourcesDiscoverResourcesWithHttpInfo($category_id = null, $
641645
* @param string $resource_ids A comma-separated list of resource IDs to filter on. (optional)
642646
* @param int $page The page number to return. (optional, default to 1)
643647
* @param float $per_page The number of resources to return per page. (optional, default to 25)
644-
* @param bool $no_dependencies (optional)
648+
* @param bool $no_dependencies Whether or not to exclude resources with dependencies listed. (optional)
649+
* @param string $excluded_resource_ids A comma-separated list of resource IDs to exclude. No filter will be applied if empty. (optional)
650+
* @param string $excluded_creator_ids A comma-separated list of creator IDs to exclude. No filter will be applied if empty. (optional)
645651
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getResourcesDiscoverResources'] to see the possible values for this operation
646652
*
647653
* @throws \InvalidArgumentException
648654
* @return \GuzzleHttp\Promise\PromiseInterface
649655
*/
650-
public function getResourcesDiscoverResourcesAsync($category_id = null, $with = null, $filters = null, $resource_ids = null, $page = 1, $per_page = 25, $no_dependencies = null, string $contentType = self::contentTypes['getResourcesDiscoverResources'][0])
656+
public function getResourcesDiscoverResourcesAsync($category_id = null, $with = null, $filters = null, $resource_ids = null, $page = 1, $per_page = 25, $no_dependencies = null, $excluded_resource_ids = null, $excluded_creator_ids = null, string $contentType = self::contentTypes['getResourcesDiscoverResources'][0])
651657
{
652-
return $this->getResourcesDiscoverResourcesAsyncWithHttpInfo($category_id, $with, $filters, $resource_ids, $page, $per_page, $no_dependencies, $contentType)
658+
return $this->getResourcesDiscoverResourcesAsyncWithHttpInfo($category_id, $with, $filters, $resource_ids, $page, $per_page, $no_dependencies, $excluded_resource_ids, $excluded_creator_ids, $contentType)
653659
->then(
654660
function ($response) {
655661
return $response[0];
@@ -668,16 +674,18 @@ function ($response) {
668674
* @param string $resource_ids A comma-separated list of resource IDs to filter on. (optional)
669675
* @param int $page The page number to return. (optional, default to 1)
670676
* @param float $per_page The number of resources to return per page. (optional, default to 25)
671-
* @param bool $no_dependencies (optional)
677+
* @param bool $no_dependencies Whether or not to exclude resources with dependencies listed. (optional)
678+
* @param string $excluded_resource_ids A comma-separated list of resource IDs to exclude. No filter will be applied if empty. (optional)
679+
* @param string $excluded_creator_ids A comma-separated list of creator IDs to exclude. No filter will be applied if empty. (optional)
672680
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getResourcesDiscoverResources'] to see the possible values for this operation
673681
*
674682
* @throws \InvalidArgumentException
675683
* @return \GuzzleHttp\Promise\PromiseInterface
676684
*/
677-
public function getResourcesDiscoverResourcesAsyncWithHttpInfo($category_id = null, $with = null, $filters = null, $resource_ids = null, $page = 1, $per_page = 25, $no_dependencies = null, string $contentType = self::contentTypes['getResourcesDiscoverResources'][0])
685+
public function getResourcesDiscoverResourcesAsyncWithHttpInfo($category_id = null, $with = null, $filters = null, $resource_ids = null, $page = 1, $per_page = 25, $no_dependencies = null, $excluded_resource_ids = null, $excluded_creator_ids = null, string $contentType = self::contentTypes['getResourcesDiscoverResources'][0])
678686
{
679687
$returnType = '\OpenAPI\Client\Model\GetResourcesDiscoverResources200Response';
680-
$request = $this->getResourcesDiscoverResourcesRequest($category_id, $with, $filters, $resource_ids, $page, $per_page, $no_dependencies, $contentType);
688+
$request = $this->getResourcesDiscoverResourcesRequest($category_id, $with, $filters, $resource_ids, $page, $per_page, $no_dependencies, $excluded_resource_ids, $excluded_creator_ids, $contentType);
681689

682690
return $this->client
683691
->sendAsync($request, $this->createHttpClientOption())
@@ -724,13 +732,15 @@ function ($exception) {
724732
* @param string $resource_ids A comma-separated list of resource IDs to filter on. (optional)
725733
* @param int $page The page number to return. (optional, default to 1)
726734
* @param float $per_page The number of resources to return per page. (optional, default to 25)
727-
* @param bool $no_dependencies (optional)
735+
* @param bool $no_dependencies Whether or not to exclude resources with dependencies listed. (optional)
736+
* @param string $excluded_resource_ids A comma-separated list of resource IDs to exclude. No filter will be applied if empty. (optional)
737+
* @param string $excluded_creator_ids A comma-separated list of creator IDs to exclude. No filter will be applied if empty. (optional)
728738
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getResourcesDiscoverResources'] to see the possible values for this operation
729739
*
730740
* @throws \InvalidArgumentException
731741
* @return \GuzzleHttp\Psr7\Request
732742
*/
733-
public function getResourcesDiscoverResourcesRequest($category_id = null, $with = null, $filters = null, $resource_ids = null, $page = 1, $per_page = 25, $no_dependencies = null, string $contentType = self::contentTypes['getResourcesDiscoverResources'][0])
743+
public function getResourcesDiscoverResourcesRequest($category_id = null, $with = null, $filters = null, $resource_ids = null, $page = 1, $per_page = 25, $no_dependencies = null, $excluded_resource_ids = null, $excluded_creator_ids = null, string $contentType = self::contentTypes['getResourcesDiscoverResources'][0])
734744
{
735745

736746

@@ -744,6 +754,8 @@ public function getResourcesDiscoverResourcesRequest($category_id = null, $with
744754

745755

746756

757+
758+
747759
$resourcePath = '/v2/resources/discover/resources';
748760
$formParams = [];
749761
$queryParams = [];
@@ -814,6 +826,24 @@ public function getResourcesDiscoverResourcesRequest($category_id = null, $with
814826
true, // explode
815827
false // required
816828
) ?? []);
829+
// query params
830+
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
831+
$excluded_resource_ids,
832+
'excluded_resource_ids', // param base name
833+
'string', // openApiType
834+
'form', // style
835+
true, // explode
836+
false // required
837+
) ?? []);
838+
// query params
839+
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
840+
$excluded_creator_ids,
841+
'excluded_creator_ids', // param base name
842+
'string', // openApiType
843+
'form', // style
844+
true, // explode
845+
false // required
846+
) ?? []);
817847

818848

819849

0 commit comments

Comments
 (0)