(Episodes)
- GetAllEpisodes - Returns a list of episodes base records with the basic attributes.
Note that all episodes are returned, even those that may not be included in a series' default season order. - GetEpisodeBase - Returns episode base record
- GetEpisodeExtended - Returns episode extended record
- GetEpisodeTranslation - Returns episode translation record
Returns a list of episodes base records with the basic attributes.
Note that all episodes are returned, even those that may not be included in a series' default season order.
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 = 672768
ctx := context.Background()
res, err := s.Episodes.GetAllEpisodes(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.GetAllEpisodesResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 400-600 | / |
Returns episode 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 = 711597
ctx := context.Background()
res, err := s.Episodes.GetEpisodeBase(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.GetEpisodeBaseResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 400-600 | / |
Returns episode 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: "",
}),
)
var id int64 = 20932
var meta *operations.Meta = operations.MetaTranslations
ctx := context.Background()
res, err := s.Episodes.GetEpisodeExtended(ctx, id, meta)
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 |
int64 | ✔️ | id | |
meta |
*operations.Meta | ➖ | meta | translations |
*operations.GetEpisodeExtendedResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 400-600 | / |
Returns episode 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 = 388621
var language string = "string"
ctx := context.Background()
res, err := s.Episodes.GetEpisodeTranslation(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.GetEpisodeTranslationResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 400-600 | / |