From af680032c6f8fb4ba23554b182897ffcac4650f1 Mon Sep 17 00:00:00 2001 From: The Meastro <134454779+the-maestro-bot@users.noreply.github.com> Date: Tue, 11 Jun 2024 01:01:58 +0200 Subject: [PATCH] Regenerate the client library according to the new specs --- README.md | 15 ++- api/openapi.yaml | 116 +++++++++++++++----- api_changes.go | 7 +- api_countries.go | 4 +- api_genres.go | 4 +- api_shows.go | 185 +++++++++++++++++++++++++++++++- client.go | 6 +- configuration.go | 6 +- docs/Episode.md | 26 +++++ docs/Show.md | 28 ++++- docs/ShowsAPI.md | 77 ++++++++++++- model_addon.go | 4 +- model_change.go | 4 +- model_change_type.go | 4 +- model_changes_result.go | 4 +- model_country.go | 4 +- model_episode.go | 41 ++++++- model_error.go | 4 +- model_genre.go | 4 +- model_horizontal_image.go | 4 +- model_item_type.go | 4 +- model_locale.go | 4 +- model_order_direction.go | 4 +- model_price.go | 4 +- model_search_result.go | 4 +- model_season.go | 4 +- model_service.go | 4 +- model_service_image_set.go | 4 +- model_service_info.go | 4 +- model_show.go | 43 +++++++- model_show_image_set.go | 4 +- model_show_type.go | 4 +- model_streaming_option.go | 4 +- model_streaming_option_type.go | 4 +- model_streaming_option_types.go | 4 +- model_subtitle.go | 4 +- model_vertical_image.go | 4 +- response.go | 4 +- utils.go | 4 +- 39 files changed, 558 insertions(+), 104 deletions(-) diff --git a/README.md b/README.md index 7561eaa..ce7ba08 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! ### API Key @@ -229,10 +229,10 @@ RapidAPI and start using the Streaming Availability API through RapidAPI right a | Service Id | Service Name | Supported Countries | | ---------- | ------------ | ------------------- | -| `netflix` | Netflix | 58 Countries | +| `netflix` | Netflix | 59 Countries | | `prime` | Prime Video | 56 Countries | -| `disney` | Disney+ | 36 Countries | -| `hbo` | HBO Max | 24 Countries | +| `disney` | Disney+ | 51 Countries | +| `hbo` | Max | 24 Countries | | `hulu` | Hulu | United States | | `peacock` | Peacock | United States | | `paramount` | Paramount+ | 18 Countries | @@ -249,6 +249,12 @@ RapidAPI and start using the Streaming Availability API through RapidAPI right a | `zee5` | Zee5 | 58 Countries | | `curiosity` | Curiosity Stream | 57 Countries | | `wow` | Wow | Germany | +| `discovery` | Discovery+ | United States, Canada, Ireland, Italy, United Kingdom, Germany, Austria | +| `sonyliv` | SonyLiv | India | +| `itvx` | ITVX | United Kingdom | +| `plutotv` | Pluto TV | 25 Countries | +| `tubi` | Tubi | Australia, Canada, New Zealand, Ecuador, Mexico, Panama, United States | +| `blutv` | BluTV | Turkey, Germany, Azerbaijan | ## Countries Supported @@ -308,6 +314,7 @@ RapidAPI and start using the Streaming Availability API through RapidAPI right a | `se` | Sweden | | `sg` | Singapore | | `si` | Slovenia | +| `sk` | Slovakia | | `th` | Thailand | | `tr` | Turkey | | `ua` | Ukraine | diff --git a/api/openapi.yaml b/api/openapi.yaml index 307b74e..b37d8fa 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -2,9 +2,10 @@ openapi: 3.1.0 info: description: "Streaming Availability API allows getting streaming availability information\ \ of movies and series; and querying the list of available shows on streaming\ - \ services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries!" + \ services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries!" + termsOfService: https://github.com/movieofthenight/streaming-availability-api/blob/main/TERMS.md title: Streaming Availability API - version: 4.0.0 + version: 4.1.0 servers: - description: Official API Server url: https://streaming-availability.p.rapidapi.com @@ -192,6 +193,39 @@ paths: summary: Search Shows by title tags: - shows + /shows/top: + get: + description: | + Get the official top shows in a service. + Top shows are determined by the streaming service itself. + + Supported streaming services are: + - Netflix: netflix + - Amazon Prime Video: prime + - Apple TV: apple + - Max: hbo + + For unsupported services, this endpoint will return an empty list. + + Series granularity is always show for this endpoint, + meaning that the output will not include season and episode info. + externalDocs: + description: Official Documentation + url: https://docs.movieofthenight.com/resource/shows#get-top-shows + operationId: getTopShows + parameters: + - $ref: '#/components/parameters/countryParam' + - $ref: '#/components/parameters/serviceParam' + - $ref: '#/components/parameters/outputLanguageParam' + - $ref: '#/components/parameters/showTypeParam' + responses: + "200": + $ref: '#/components/responses/topShowsResponse' + default: + $ref: '#/components/responses/errorResponse' + summary: Get Top Shows + tags: + - shows /changes: get: description: | @@ -200,6 +234,9 @@ paths: Changes listed per page is 25. Changes are listed under changes field, and shows affected by these changes are listed under shows field. + + Note that upcoming changes are only supported for Apple TV, Disney+, Max, Netflix and Prime Video. + For other services, upcoming changes will return an empty list. externalDocs: description: Official Documentation url: https://docs.movieofthenight.com/resource/shows#search-shows-by-title @@ -226,6 +263,26 @@ paths: - changes components: parameters: + serviceParam: + description: | + Id of the target service. + examples: + Netflix: + description: Netflix + value: netflix + Amazon Prime Video: + description: Amazon Prime Video + value: prime + Apple TV: + description: Apple TV + value: apple + explode: true + in: query + name: service + required: true + schema: + type: string + style: form catalogsParam: description: | A comma separated list of up to 32 catalogs to search in. @@ -325,7 +382,7 @@ components: value: action Romantic Comedy: description: Romantic Comedy - value: "romantic,comedy" + value: "romance,comedy" War Drama: description: War Drama value: "war,drama" @@ -707,11 +764,6 @@ components: When passing a TMDB Id, it should be in the format of movie/ for movies and tv/ for series. (e.g. tv/1396 for Breaking Bad and movie/597 for Titanic) - - If you are handcrafting the URL, make sure to encode the id parameter. - (e.g. final path should look like /shows/movie%2F597 for Titanic with TMDb id). - Here, %2F is the encoded version of /. - To read more about URL encoding, you can check [this link](https://en.wikipedia.org/wiki/Percent-encoding). examples: Titanic (IMDb): description: IMDb ID of the movie Titanic. @@ -1025,6 +1077,29 @@ components: $ref: '#/components/schemas/show' type: array description: Response to a search by title query. + topShowsResponse: + content: + application/json: + examples: + Top Series on Netflix US: + externalValue: https://www.movieofthenight.com/v4/examples/shows/netflix/top/series + summary: Top Series on Netflix US + x-parameters: + country: us + service: netflix + show_type: series + Top Shows on Apple TV+ UK: + externalValue: https://www.movieofthenight.com/v4/examples/shows/apple/top + summary: Top Shows on Apple TV+ UK + x-parameters: + country: gb + service: apple + schema: + description: Array of the top shows. + items: + $ref: '#/components/schemas/show' + type: array + description: Response to a top shows query. changesResponse: content: application/json: @@ -1068,7 +1143,6 @@ components: description: Response to a change set query. schemas: addon: - additionalProperties: false description: Details of an addon. properties: id: @@ -1093,7 +1167,6 @@ components: - themeColorCode title: addon streamingOptionTypes: - additionalProperties: false description: Availability of the streaming option types in the service. properties: addon: @@ -1119,7 +1192,6 @@ components: - subscription title: streamingOptionTypes serviceImageSet: - additionalProperties: false description: Image set of a service or an addon. properties: lightThemeImage: @@ -1137,7 +1209,6 @@ components: - whiteImage title: serviceImageSet serviceInfo: - additionalProperties: false description: Details of the streaming service localized according to the parent country. properties: @@ -1165,8 +1236,7 @@ components: service: allOf: - $ref: '#/components/schemas/serviceInfo' - - additionalProperties: false - properties: + - properties: streamingOptionTypes: $ref: '#/components/schemas/streamingOptionTypes' addons: @@ -1187,7 +1257,6 @@ components: $ref: '#/components/schemas/streamingOption' description: Map of the streaming options by the country code. country: - additionalProperties: false description: | Countries are the primary way to get the supported streaming services and addons (such as list of available Apple TV and Prime Video channels) in a region. @@ -1216,7 +1285,6 @@ components: - services title: country show: - additionalProperties: false description: | A show object represents a movie or a series. Type of the show is determined by the showType property, which is either movie or series. Based on this type, some properties are omitted, @@ -1258,7 +1326,7 @@ components: description: "[IMDb](https://www.imdb.com/) id of the show." type: string tmdbId: - description: "[TMDD](https://www.themoviedb.org/) id of the show." + description: "[TMDB](https://www.themoviedb.org/) id of the show." type: string title: description: Title of the show. @@ -1312,6 +1380,9 @@ components: description: Number of episodes that are either aired or announced for a series. type: integer + runtime: + description: Runtime of the movie in minutes. + type: integer imageSet: $ref: '#/components/schemas/showImageSet' streamingOptions: @@ -1341,7 +1412,6 @@ components: - tmdbId title: show showImageSet: - additionalProperties: false description: Image set of a show. properties: verticalPoster: @@ -1357,7 +1427,6 @@ components: - verticalPoster title: showImageSet horizontalImage: - additionalProperties: false description: Horizontal image of a show. properties: w360: @@ -1383,7 +1452,6 @@ components: - w720 title: horizontalImage verticalImage: - additionalProperties: false description: Horizontal image of a show. properties: w240: @@ -1450,6 +1518,9 @@ components: title: description: Title of the episode. type: string + overview: + description: A brief overview of the plot of the episode. + type: string airYear: description: The year that the episode aired. type: integer @@ -1481,7 +1552,6 @@ components: rent: Available for rental. addon: Available via an addon. streamingOption: - additionalProperties: false description: A streaming option. properties: service: @@ -1550,7 +1620,6 @@ components: - type title: streamingOption price: - additionalProperties: false description: | Price of the renting or buying the item. @@ -1767,7 +1836,6 @@ components: expiring: Expiring from the catalog soon. upcoming: Will be added to the catalog soon. error: - additionalProperties: false properties: message: type: string @@ -1775,7 +1843,6 @@ components: - message title: error searchResult: - additionalProperties: false properties: shows: description: Array of shows. @@ -1792,7 +1859,6 @@ components: - hasMore - shows changesResult: - additionalProperties: false properties: changes: description: Array of the changes. diff --git a/api_changes.go b/api_changes.go index a72d799..71a532f 100644 --- a/api_changes.go +++ b/api_changes.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -117,6 +117,9 @@ Changes listed per page is 25. Changes are listed under changes field, and shows affected by these changes are listed under shows field. +Note that upcoming changes are only supported for Apple TV, Disney+, Max, Netflix and Prime Video. +For other services, upcoming changes will return an empty list. + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetChangesRequest diff --git a/api_countries.go b/api_countries.go index 54b71b1..8b59d6d 100644 --- a/api_countries.go +++ b/api_countries.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/api_genres.go b/api_genres.go index 279841c..7c6d69c 100644 --- a/api_genres.go +++ b/api_genres.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/api_shows.go b/api_shows.go index 5941f07..48598e2 100644 --- a/api_shows.go +++ b/api_shows.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -60,7 +60,7 @@ GetShow Get a Show Get the details of a show via id, imdbId or tmdbId, including the global streaming availability info. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id id of the show. You can also pass an IMDb Id or a TMDB Id as an id. The endpoint will automatically detect the type of the id and fetch the show accordingly. When passing an IMDb Id, it should be in the format of tt. (e.g. tt0120338 for Titanic) When passing a TMDB Id, it should be in the format of movie/ for movies and tv/ for series. (e.g. tv/1396 for Breaking Bad and movie/597 for Titanic) If you are handcrafting the URL, make sure to encode the id parameter. (e.g. final path should look like /shows/movie%2F597 for Titanic with TMDb id). Here, %2F is the encoded version of /. To read more about URL encoding, you can check [this link](https://en.wikipedia.org/wiki/Percent-encoding). + @param id id of the show. You can also pass an IMDb Id or a TMDB Id as an id. The endpoint will automatically detect the type of the id and fetch the show accordingly. When passing an IMDb Id, it should be in the format of tt. (e.g. tt0120338 for Titanic) When passing a TMDB Id, it should be in the format of movie/ for movies and tv/ for series. (e.g. tv/1396 for Breaking Bad and movie/597 for Titanic) @return ApiGetShowRequest */ func (a *ShowsAPIService) GetShow(ctx context.Context, id string) ApiGetShowRequest { @@ -195,6 +195,185 @@ func (a *ShowsAPIService) GetShowExecute(r ApiGetShowRequest) (*Show, *http.Resp return localVarReturnValue, localVarHTTPResponse, nil } +type ApiGetTopShowsRequest struct { + ctx context.Context + ApiService *ShowsAPIService + country *string + service *string + outputLanguage *string + showType *ShowType +} + +// [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of the target country. See /countries endpoint to get the list of supported countries. +func (r ApiGetTopShowsRequest) Country(country string) ApiGetTopShowsRequest { + r.country = &country + return r +} + +// Id of the target service. +func (r ApiGetTopShowsRequest) Service(service string) ApiGetTopShowsRequest { + r.service = &service + return r +} + +// [ISO 639-1 code](https://en.wikipedia.org/wiki/ISO_639-1) of the output language. Determines in which language the output will be in. +func (r ApiGetTopShowsRequest) OutputLanguage(outputLanguage string) ApiGetTopShowsRequest { + r.outputLanguage = &outputLanguage + return r +} + +// Type of shows to search in. If not supplied, both movies and series will be included in the search results. +func (r ApiGetTopShowsRequest) ShowType(showType ShowType) ApiGetTopShowsRequest { + r.showType = &showType + return r +} + +func (r ApiGetTopShowsRequest) Execute() ([]Show, *http.Response, error) { + return r.ApiService.GetTopShowsExecute(r) +} + +/* +GetTopShows Get Top Shows + +Get the official top shows in a service. +Top shows are determined by the streaming service itself. + +Supported streaming services are: +- Netflix: netflix +- Amazon Prime Video: prime +- Apple TV: apple +- Max: hbo + +For unsupported services, this endpoint will return an empty list. + +Series granularity is always show for this endpoint, +meaning that the output will not include season and episode info. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetTopShowsRequest +*/ +func (a *ShowsAPIService) GetTopShows(ctx context.Context) ApiGetTopShowsRequest { + return ApiGetTopShowsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Show +func (a *ShowsAPIService) GetTopShowsExecute(r ApiGetTopShowsRequest) ([]Show, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Show + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ShowsAPIService.GetTopShows") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/shows/top" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.country == nil { + return localVarReturnValue, nil, reportError("country is required and must be specified") + } + if r.service == nil { + return localVarReturnValue, nil, reportError("service is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "country", r.country, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "service", r.service, "") + if r.outputLanguage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "output_language", r.outputLanguage, "") + } else { + var defaultValue string = "en" + r.outputLanguage = &defaultValue + } + if r.showType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "show_type", r.showType, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["X-Rapid-API-Key"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-RapidAPI-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiSearchShowsByFiltersRequest struct { ctx context.Context ApiService *ShowsAPIService diff --git a/client.go b/client.go index 27f35d9..37fe633 100644 --- a/client.go +++ b/client.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -41,7 +41,7 @@ var ( queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) -// APIClient manages communication with the Streaming Availability API API v4.0.0 +// APIClient manages communication with the Streaming Availability API API v4.1.0 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration diff --git a/configuration.go b/configuration.go index 5c37f07..9caeafe 100644 --- a/configuration.go +++ b/configuration.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -89,7 +89,7 @@ type Configuration struct { func NewConfiguration() *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), - UserAgent: "go-streaming-availability/v4.2.0", + UserAgent: "go-streaming-availability/v4.3.0", Debug: false, Servers: ServerConfigurations{ { diff --git a/docs/Episode.md b/docs/Episode.md index d942e32..eb02301 100644 --- a/docs/Episode.md +++ b/docs/Episode.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ItemType** | **string** | Type of the item. Always episode. | **Title** | **string** | Title of the episode. | +**Overview** | Pointer to **string** | A brief overview of the plot of the episode. | [optional] **AirYear** | **int32** | The year that the episode aired. | **StreamingOptions** | | Map of the streaming options by the country code. | @@ -68,6 +69,31 @@ and a boolean to check if the value has been set. SetTitle sets Title field to given value. +### GetOverview + +`func (o *Episode) GetOverview() string` + +GetOverview returns the Overview field if non-nil, zero value otherwise. + +### GetOverviewOk + +`func (o *Episode) GetOverviewOk() (*string, bool)` + +GetOverviewOk returns a tuple with the Overview field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOverview + +`func (o *Episode) SetOverview(v string)` + +SetOverview sets Overview field to given value. + +### HasOverview + +`func (o *Episode) HasOverview() bool` + +HasOverview returns a boolean if a field has been set. + ### GetAirYear `func (o *Episode) GetAirYear() int32` diff --git a/docs/Show.md b/docs/Show.md index f9d3979..e3c4cd8 100644 --- a/docs/Show.md +++ b/docs/Show.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **ShowType** | [**ShowType**](ShowType.md) | Type of the show. Based on the type, some properties might be omitted. | **Id** | **string** | Id of the show. | **ImdbId** | **string** | [IMDb](https://www.imdb.com/) id of the show. | -**TmdbId** | **string** | [TMDD](https://www.themoviedb.org/) id of the show. | +**TmdbId** | **string** | [TMDB](https://www.themoviedb.org/) id of the show. | **Title** | **string** | Title of the show. | **Overview** | **string** | A brief overview of the overall plot of the show. | **ReleaseYear** | Pointer to **int32** | The year that the movie was released. | [optional] @@ -22,6 +22,7 @@ Name | Type | Description | Notes **Rating** | **int32** | Rating of the show. This is calculated by taking the average of ratings found online from multiple sources. | **SeasonCount** | Pointer to **int32** | Number of seasons that are either aired or announced for a series. | [optional] **EpisodeCount** | Pointer to **int32** | Number of episodes that are either aired or announced for a series. | [optional] +**Runtime** | Pointer to **int32** | Runtime of the movie in minutes. | [optional] **ImageSet** | [**ShowImageSet**](ShowImageSet.md) | Image set of the show. | **StreamingOptions** | | Map of the streaming options by the country code. | **Seasons** | Pointer to [**[]Season**](Season.md) | Array of the seasons belong to the series. | [optional] @@ -440,6 +441,31 @@ SetEpisodeCount sets EpisodeCount field to given value. HasEpisodeCount returns a boolean if a field has been set. +### GetRuntime + +`func (o *Show) GetRuntime() int32` + +GetRuntime returns the Runtime field if non-nil, zero value otherwise. + +### GetRuntimeOk + +`func (o *Show) GetRuntimeOk() (*int32, bool)` + +GetRuntimeOk returns a tuple with the Runtime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRuntime + +`func (o *Show) SetRuntime(v int32)` + +SetRuntime sets Runtime field to given value. + +### HasRuntime + +`func (o *Show) HasRuntime() bool` + +HasRuntime returns a boolean if a field has been set. + ### GetImageSet `func (o *Show) GetImageSet() ShowImageSet` diff --git a/docs/ShowsAPI.md b/docs/ShowsAPI.md index cfc3095..c5f2e31 100644 --- a/docs/ShowsAPI.md +++ b/docs/ShowsAPI.md @@ -5,6 +5,7 @@ All URIs are relative to *https://streaming-availability.p.rapidapi.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**GetShow**](ShowsAPI.md#GetShow) | **Get** /shows/{id} | Get a Show +[**GetTopShows**](ShowsAPI.md#GetTopShows) | **Get** /shows/top | Get Top Shows [**SearchShowsByFilters**](ShowsAPI.md#SearchShowsByFilters) | **Get** /shows/search/filters | Search Shows by filters [**SearchShowsByTitle**](ShowsAPI.md#SearchShowsByTitle) | **Get** /shows/search/title | Search Shows by title @@ -31,7 +32,7 @@ import ( ) func main() { - id := "tt0120338" // string | id of the show. You can also pass an IMDb Id or a TMDB Id as an id. The endpoint will automatically detect the type of the id and fetch the show accordingly. When passing an IMDb Id, it should be in the format of tt. (e.g. tt0120338 for Titanic) When passing a TMDB Id, it should be in the format of movie/ for movies and tv/ for series. (e.g. tv/1396 for Breaking Bad and movie/597 for Titanic) If you are handcrafting the URL, make sure to encode the id parameter. (e.g. final path should look like /shows/movie%2F597 for Titanic with TMDb id). Here, %2F is the encoded version of /. To read more about URL encoding, you can check [this link](https://en.wikipedia.org/wiki/Percent-encoding). + id := "tt0120338" // string | id of the show. You can also pass an IMDb Id or a TMDB Id as an id. The endpoint will automatically detect the type of the id and fetch the show accordingly. When passing an IMDb Id, it should be in the format of tt. (e.g. tt0120338 for Titanic) When passing a TMDB Id, it should be in the format of movie/ for movies and tv/ for series. (e.g. tv/1396 for Breaking Bad and movie/597 for Titanic) country := "ca" // string | [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of the optional target country. If this parameter is not supplied, global streaming availability across all the countries will be returned. If it is supplied, only the streaming availability info from the given country will be returned. If you are only interested in the streaming availability in a single country, then it is recommended to use this parameter to reduce the size of the response and increase the performance of the endpoint. See /countries endpoint to get the list of supported countries. (optional) seriesGranularity := "seriesGranularity_example" // string | series_granularity determines the level of detail for series. It does not affect movies. If series_granularity is show, then the output will not include season and episode info. If series_granularity is season, then the output will include season info but not episode info. If series_granularity is episode, then the output will include season and episode info. If you do not need season and episode info, then it is recommended to set series_granularity as show to reduce the size of the response and increase the performance of the endpoint. If you need deep links for individual seasons and episodes, then you should set series_granularity as episode. In this case response will include full streaming info for seasons and episodes, similar to the streaming info for movies and series; including deep links into seasons and episodes, individual subtitle/audio and video quality info etc. (optional) (default to "episode") outputLanguage := "outputLanguage_example" // string | [ISO 639-1 code](https://en.wikipedia.org/wiki/ISO_639-1) of the output language. Determines in which language the output will be in. (optional) (default to "en") @@ -54,7 +55,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | id of the show. You can also pass an IMDb Id or a TMDB Id as an id. The endpoint will automatically detect the type of the id and fetch the show accordingly. When passing an IMDb Id, it should be in the format of tt<numerical_id>. (e.g. tt0120338 for Titanic) When passing a TMDB Id, it should be in the format of movie/<numerical_id> for movies and tv/<numerical_id> for series. (e.g. tv/1396 for Breaking Bad and movie/597 for Titanic) If you are handcrafting the URL, make sure to encode the id parameter. (e.g. final path should look like /shows/movie%2F597 for Titanic with TMDb id). Here, %2F is the encoded version of /. To read more about URL encoding, you can check [this link](https://en.wikipedia.org/wiki/Percent-encoding). | +**id** | **string** | id of the show. You can also pass an IMDb Id or a TMDB Id as an id. The endpoint will automatically detect the type of the id and fetch the show accordingly. When passing an IMDb Id, it should be in the format of tt<numerical_id>. (e.g. tt0120338 for Titanic) When passing a TMDB Id, it should be in the format of movie/<numerical_id> for movies and tv/<numerical_id> for series. (e.g. tv/1396 for Breaking Bad and movie/597 for Titanic) | ### Other Parameters @@ -86,6 +87,78 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetTopShows + +> []Show GetTopShows(ctx).Country(country).Service(service).OutputLanguage(outputLanguage).ShowType(showType).Execute() + +Get Top Shows + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/movieofthenight/go-streaming-availability" +) + +func main() { + country := "ca" // string | [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of the target country. See /countries endpoint to get the list of supported countries. + service := "netflix" // string | Id of the target service. + outputLanguage := "outputLanguage_example" // string | [ISO 639-1 code](https://en.wikipedia.org/wiki/ISO_639-1) of the output language. Determines in which language the output will be in. (optional) (default to "en") + showType := openapiclient.showType("movie") // ShowType | Type of shows to search in. If not supplied, both movies and series will be included in the search results. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ShowsAPI.GetTopShows(context.Background()).Country(country).Service(service).OutputLanguage(outputLanguage).ShowType(showType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ShowsAPI.GetTopShows``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTopShows`: []Show + fmt.Fprintf(os.Stdout, "Response from `ShowsAPI.GetTopShows`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTopShowsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **country** | **string** | [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of the target country. See /countries endpoint to get the list of supported countries. | + **service** | **string** | Id of the target service. | + **outputLanguage** | **string** | [ISO 639-1 code](https://en.wikipedia.org/wiki/ISO_639-1) of the output language. Determines in which language the output will be in. | [default to "en"] + **showType** | [**ShowType**](ShowType.md) | Type of shows to search in. If not supplied, both movies and series will be included in the search results. | + +### Return type + +[**[]Show**](Show.md) + +### Authorization + +[X-Rapid-API-Key](../README.md#X-Rapid-API-Key) + +### HTTP request headers + +- **Content-Type**: 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) +[[Back to README]](../README.md) + + ## SearchShowsByFilters > SearchResult SearchShowsByFilters(ctx).Country(country).Catalogs(catalogs).OutputLanguage(outputLanguage).ShowType(showType).Genres(genres).GenresRelation(genresRelation).ShowOriginalLanguage(showOriginalLanguage).YearMin(yearMin).YearMax(yearMax).RatingMin(ratingMin).RatingMax(ratingMax).Keyword(keyword).SeriesGranularity(seriesGranularity).OrderBy(orderBy).OrderDirection(orderDirection).Cursor(cursor).Execute() diff --git a/model_addon.go b/model_addon.go index 653404b..d1dd415 100644 --- a/model_addon.go +++ b/model_addon.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_change.go b/model_change.go index 71e3adf..86356ca 100644 --- a/model_change.go +++ b/model_change.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_change_type.go b/model_change_type.go index f7a1d4f..7e53248 100644 --- a/model_change_type.go +++ b/model_change_type.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_changes_result.go b/model_changes_result.go index feac756..1151199 100644 --- a/model_changes_result.go +++ b/model_changes_result.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_country.go b/model_country.go index b29552d..cf36528 100644 --- a/model_country.go +++ b/model_country.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_episode.go b/model_episode.go index c9a2d9b..91195ca 100644 --- a/model_episode.go +++ b/model_episode.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -25,6 +25,8 @@ type Episode struct { ItemType string `json:"itemType"` // Title of the episode. Title string `json:"title"` + // A brief overview of the plot of the episode. + Overview *string `json:"overview,omitempty"` // The year that the episode aired. AirYear int32 `json:"airYear"` // Map of the streaming options by the country code. @@ -102,6 +104,38 @@ func (o *Episode) SetTitle(v string) { o.Title = v } +// GetOverview returns the Overview field value if set, zero value otherwise. +func (o *Episode) GetOverview() string { + if o == nil || IsNil(o.Overview) { + var ret string + return ret + } + return *o.Overview +} + +// GetOverviewOk returns a tuple with the Overview field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Episode) GetOverviewOk() (*string, bool) { + if o == nil || IsNil(o.Overview) { + return nil, false + } + return o.Overview, true +} + +// HasOverview returns a boolean if a field has been set. +func (o *Episode) HasOverview() bool { + if o != nil && !IsNil(o.Overview) { + return true + } + + return false +} + +// SetOverview gets a reference to the given string and assigns it to the Overview field. +func (o *Episode) SetOverview(v string) { + o.Overview = &v +} + // GetAirYear returns the AirYear field value func (o *Episode) GetAirYear() int32 { if o == nil { @@ -162,6 +196,9 @@ func (o Episode) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["itemType"] = o.ItemType toSerialize["title"] = o.Title + if !IsNil(o.Overview) { + toSerialize["overview"] = o.Overview + } toSerialize["airYear"] = o.AirYear toSerialize["streamingOptions"] = o.StreamingOptions return toSerialize, nil diff --git a/model_error.go b/model_error.go index 5d49b71..e595963 100644 --- a/model_error.go +++ b/model_error.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_genre.go b/model_genre.go index fc10f3e..c023215 100644 --- a/model_genre.go +++ b/model_genre.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_horizontal_image.go b/model_horizontal_image.go index 29ac314..39927f7 100644 --- a/model_horizontal_image.go +++ b/model_horizontal_image.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_item_type.go b/model_item_type.go index 09cbcd7..a9530c0 100644 --- a/model_item_type.go +++ b/model_item_type.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_locale.go b/model_locale.go index 5aa61bc..24ee3a3 100644 --- a/model_locale.go +++ b/model_locale.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_order_direction.go b/model_order_direction.go index ef3f29a..2af8d80 100644 --- a/model_order_direction.go +++ b/model_order_direction.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_price.go b/model_price.go index 937b63d..e875748 100644 --- a/model_price.go +++ b/model_price.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_search_result.go b/model_search_result.go index c62b1ae..14764d9 100644 --- a/model_search_result.go +++ b/model_search_result.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_season.go b/model_season.go index 92832e4..e01ac72 100644 --- a/model_season.go +++ b/model_season.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_service.go b/model_service.go index 96d99a1..56ad7fa 100644 --- a/model_service.go +++ b/model_service.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_service_image_set.go b/model_service_image_set.go index a8b89ea..c63f2e5 100644 --- a/model_service_image_set.go +++ b/model_service_image_set.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_service_info.go b/model_service_info.go index c0254ef..cb19954 100644 --- a/model_service_info.go +++ b/model_service_info.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_show.go b/model_show.go index 98f3ddb..bc816fb 100644 --- a/model_show.go +++ b/model_show.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -29,7 +29,7 @@ type Show struct { Id string `json:"id"` // [IMDb](https://www.imdb.com/) id of the show. ImdbId string `json:"imdbId"` - // [TMDD](https://www.themoviedb.org/) id of the show. + // [TMDB](https://www.themoviedb.org/) id of the show. TmdbId string `json:"tmdbId"` // Title of the show. Title string `json:"title"` @@ -57,6 +57,8 @@ type Show struct { SeasonCount *int32 `json:"seasonCount,omitempty"` // Number of episodes that are either aired or announced for a series. EpisodeCount *int32 `json:"episodeCount,omitempty"` + // Runtime of the movie in minutes. + Runtime *int32 `json:"runtime,omitempty"` // Image set of the show. ImageSet ShowImageSet `json:"imageSet"` // Map of the streaming options by the country code. @@ -585,6 +587,38 @@ func (o *Show) SetEpisodeCount(v int32) { o.EpisodeCount = &v } +// GetRuntime returns the Runtime field value if set, zero value otherwise. +func (o *Show) GetRuntime() int32 { + if o == nil || IsNil(o.Runtime) { + var ret int32 + return ret + } + return *o.Runtime +} + +// GetRuntimeOk returns a tuple with the Runtime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Show) GetRuntimeOk() (*int32, bool) { + if o == nil || IsNil(o.Runtime) { + return nil, false + } + return o.Runtime, true +} + +// HasRuntime returns a boolean if a field has been set. +func (o *Show) HasRuntime() bool { + if o != nil && !IsNil(o.Runtime) { + return true + } + + return false +} + +// SetRuntime gets a reference to the given int32 and assigns it to the Runtime field. +func (o *Show) SetRuntime(v int32) { + o.Runtime = &v +} + // GetImageSet returns the ImageSet field value func (o *Show) GetImageSet() ShowImageSet { if o == nil { @@ -707,6 +741,9 @@ func (o Show) ToMap() (map[string]interface{}, error) { if !IsNil(o.EpisodeCount) { toSerialize["episodeCount"] = o.EpisodeCount } + if !IsNil(o.Runtime) { + toSerialize["runtime"] = o.Runtime + } toSerialize["imageSet"] = o.ImageSet toSerialize["streamingOptions"] = o.StreamingOptions if !IsNil(o.Seasons) { diff --git a/model_show_image_set.go b/model_show_image_set.go index 8a46a15..692cf9d 100644 --- a/model_show_image_set.go +++ b/model_show_image_set.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_show_type.go b/model_show_type.go index afe65ce..390d348 100644 --- a/model_show_type.go +++ b/model_show_type.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_streaming_option.go b/model_streaming_option.go index 1ba5d1e..94d8f1e 100644 --- a/model_streaming_option.go +++ b/model_streaming_option.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_streaming_option_type.go b/model_streaming_option_type.go index fb6d7be..d4f6030 100644 --- a/model_streaming_option_type.go +++ b/model_streaming_option_type.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_streaming_option_types.go b/model_streaming_option_types.go index 19d8f5b..08d60d2 100644 --- a/model_streaming_option_types.go +++ b/model_streaming_option_types.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_subtitle.go b/model_subtitle.go index 4fe3177..a71f454 100644 --- a/model_subtitle.go +++ b/model_subtitle.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_vertical_image.go b/model_vertical_image.go index b7377ff..28fa39e 100644 --- a/model_vertical_image.go +++ b/model_vertical_image.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/response.go b/response.go index b9b1299..b7be9df 100644 --- a/response.go +++ b/response.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/utils.go b/utils.go index 9526f70..22431f4 100644 --- a/utils.go +++ b/utils.go @@ -1,9 +1,9 @@ /* Streaming Availability API -Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! +Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 60 countries! -API version: 4.0.0 +API version: 4.1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.