Skip to content

Commit

Permalink
fix: SeriesLookup return type
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuochi committed Jan 5, 2023
1 parent 87f52f6 commit 45a1301
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ Class | Method | HTTP request | Description
*SeriesEditorApi* | [**DeleteSeriesEditor**](docs/SeriesEditorApi.md#deleteserieseditor) | **Delete** /api/v3/series/editor |
*SeriesEditorApi* | [**PutSeriesEditor**](docs/SeriesEditorApi.md#putserieseditor) | **Put** /api/v3/series/editor |
*SeriesImportApi* | [**CreateSeriesImport**](docs/SeriesImportApi.md#createseriesimport) | **Post** /api/v3/series/import |
*SeriesLookupApi* | [**GetSeriesLookup**](docs/SeriesLookupApi.md#getserieslookup) | **Get** /api/v3/series/lookup |
*SeriesLookupApi* | [**ListSeriesLookup**](docs/SeriesLookupApi.md#listserieslookup) | **Get** /api/v3/series/lookup |
*StaticResourceApi* | [**Get**](docs/StaticResourceApi.md#get) | **Get** / |
*StaticResourceApi* | [**GetByPath**](docs/StaticResourceApi.md#getbypath) | **Get** /{path} |
*StaticResourceApi* | [**GetContentByPath**](docs/StaticResourceApi.md#getcontentbypath) | **Get** /content/{path} |
Expand Down
6 changes: 6 additions & 0 deletions sonarr/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4290,6 +4290,12 @@ paths:
style: form
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/SeriesResource'
type: array
description: Success
tags:
- SeriesLookup
Expand Down
45 changes: 28 additions & 17 deletions sonarr/api_series_lookup.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 10 additions & 8 deletions sonarr/docs/SeriesLookupApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ All URIs are relative to *http://localhost:8989*

Method | HTTP request | Description
------------- | ------------- | -------------
[**GetSeriesLookup**](SeriesLookupApi.md#GetSeriesLookup) | **Get** /api/v3/series/lookup |
[**ListSeriesLookup**](SeriesLookupApi.md#ListSeriesLookup) | **Get** /api/v3/series/lookup |



## GetSeriesLookup
## ListSeriesLookup

> GetSeriesLookup(ctx).Term(term).Execute()
> []SeriesResource ListSeriesLookup(ctx).Term(term).Execute()


Expand All @@ -31,11 +31,13 @@ func main() {

configuration := sonarrClient.NewConfiguration()
apiClient := sonarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.SeriesLookupApi.GetSeriesLookup(context.Background()).Term(term).Execute()
resp, r, err := apiClient.SeriesLookupApi.ListSeriesLookup(context.Background()).Term(term).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SeriesLookupApi.GetSeriesLookup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Error when calling `SeriesLookupApi.ListSeriesLookup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListSeriesLookup`: []SeriesResource
fmt.Fprintf(os.Stdout, "Response from `SeriesLookupApi.ListSeriesLookup`: %v\n", resp)
}
```

Expand All @@ -45,7 +47,7 @@ func main() {

### Other Parameters

Other parameters are passed through a pointer to a apiGetSeriesLookupRequest struct via the builder pattern
Other parameters are passed through a pointer to a apiListSeriesLookupRequest struct via the builder pattern


Name | Type | Description | Notes
Expand All @@ -54,7 +56,7 @@ Name | Type | Description | Notes

### Return type

(empty response body)
[**[]SeriesResource**](SeriesResource.md)

### Authorization

Expand All @@ -63,7 +65,7 @@ Name | Type | Description | Notes
### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
Expand Down

0 comments on commit 45a1301

Please sign in to comment.