(Seasons)
- GetAllSeasons - returns list of seasons base records
- GetSeasonBase - Returns season base record
- GetSeasonExtended - Returns season extended record
- GetSeasonTranslation - Returns season translation record
- GetSeasonTypes - Returns season type records
returns list of seasons 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: "",
}),
)
var page *int64 = 817594
ctx := context.Background()
res, err := s.Seasons.GetAllSeasons(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 |
*int64 | ➖ | page number |
*operations.GetAllSeasonsResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 400-600 | / |
Returns season 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: "",
}),
)
var id int64 = 998723
ctx := context.Background()
res, err := s.Seasons.GetSeasonBase(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 |
int64 | ✔️ | id |
*operations.GetSeasonBaseResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 400-600 | / |
Returns season extended 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: "",
}),
)
var id int64 = 866311
ctx := context.Background()
res, err := s.Seasons.GetSeasonExtended(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 |
int64 | ✔️ | id |
*operations.GetSeasonExtendedResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 400-600 | / |
Returns season 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: "",
}),
)
var id int64 = 566049
var language string = "string"
ctx := context.Background()
res, err := s.Seasons.GetSeasonTranslation(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 |
int64 | ✔️ | id |
language |
string | ✔️ | language |
*operations.GetSeasonTranslationResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 400-600 | / |
Returns season type 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: "",
}),
)
ctx := context.Background()
res, err := s.Seasons.GetSeasonTypes(ctx)
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. |
*operations.GetSeasonTypesResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 400-600 | / |