(Movies)
- GetAllMovie - returns list of movie base records
- GetMovieBase - Returns movie base record
- GetMovieBaseBySlug - Returns movie base record search by slug
- GetMovieExtended - Returns movie extended record
- GetMovieTranslation - Returns movie translation record
- GetMoviesFilter - Search movies based on filter parameters
returns list of movie base records
package main
import(
"github.com/dashotv/tvdb/openapi/models/shared"
"github.com/dashotv/tvdb/openapi"
"context"
"log"
)
func main() {
s := openapi.New(
openapi.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
}),
)
var page *float64 = openapi.Float64(9632.57)
ctx := context.Background()
res, err := s.Movies.GetAllMovie(ctx, page)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
page |
*float64 | ➖ | page number |
*operations.GetAllMovieResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Returns movie base record
package main
import(
"github.com/dashotv/tvdb/openapi/models/shared"
"github.com/dashotv/tvdb/openapi"
"context"
"log"
)
func main() {
s := openapi.New(
openapi.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
}),
)
var id float64 = 3592.32
ctx := context.Background()
res, err := s.Movies.GetMovieBase(ctx, id)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
id |
float64 | ✔️ | id |
*operations.GetMovieBaseResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Returns movie base record search by slug
package main
import(
"github.com/dashotv/tvdb/openapi/models/shared"
"github.com/dashotv/tvdb/openapi"
"context"
"log"
)
func main() {
s := openapi.New(
openapi.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
}),
)
var slug string = "<value>"
ctx := context.Background()
res, err := s.Movies.GetMovieBaseBySlug(ctx, slug)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
slug |
string | ✔️ | slug |
*operations.GetMovieBaseBySlugResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Returns movie extended record
package main
import(
"github.com/dashotv/tvdb/openapi/models/shared"
"github.com/dashotv/tvdb/openapi"
"github.com/dashotv/tvdb/openapi/models/operations"
"context"
"log"
)
func main() {
s := openapi.New(
openapi.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
}),
)
var id float64 = 4597.44
var meta *operations.QueryParamMeta = operations.QueryParamMetaTranslations.ToPointer()
var short *bool = openapi.Bool(false)
ctx := context.Background()
res, err := s.Movies.GetMovieExtended(ctx, id, meta, short)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
id |
float64 | ✔️ | id | |
meta |
*operations.QueryParamMeta | ➖ | meta | translations |
short |
*bool | ➖ | reduce the payload and returns the short version of this record without characters, artworks and trailers. |
*operations.GetMovieExtendedResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Returns movie translation record
package main
import(
"github.com/dashotv/tvdb/openapi/models/shared"
"github.com/dashotv/tvdb/openapi"
"context"
"log"
)
func main() {
s := openapi.New(
openapi.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
}),
)
var id float64 = 3544.29
var language string = "<value>"
ctx := context.Background()
res, err := s.Movies.GetMovieTranslation(ctx, id, language)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
id |
float64 | ✔️ | id |
language |
string | ✔️ | language |
*operations.GetMovieTranslationResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Search movies based on filter parameters
package main
import(
"github.com/dashotv/tvdb/openapi/models/shared"
"github.com/dashotv/tvdb/openapi"
"github.com/dashotv/tvdb/openapi/models/operations"
"context"
"log"
)
func main() {
s := openapi.New(
openapi.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
}),
)
request := operations.GetMoviesFilterRequest{
Company: openapi.Float64(1),
ContentRating: openapi.Float64(245),
Country: "usa",
Genre: openapi.Float64(3),
Lang: "eng",
Year: openapi.Float64(2020),
}
ctx := context.Background()
res, err := s.Movies.GetMoviesFilter(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetMoviesFilterRequest | ✔️ | The request object to use for the request. |
*operations.GetMoviesFilterResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |