Skip to content

Latest commit

 

History

History
274 lines (198 loc) · 9.19 KB

README.md

File metadata and controls

274 lines (198 loc) · 9.19 KB

Seasons

(Seasons)

Available Operations

GetAllSeasons

returns list of seasons base records

Example Usage

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
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
page *int64 page number

Response

*operations.GetAllSeasonsResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 400-600 /

GetSeasonBase

Returns season base record

Example Usage

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
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
id int64 ✔️ id

Response

*operations.GetSeasonBaseResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 400-600 /

GetSeasonExtended

Returns season extended record

Example Usage

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
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
id int64 ✔️ id

Response

*operations.GetSeasonExtendedResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 400-600 /

GetSeasonTranslation

Returns season translation record

Example Usage

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
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
id int64 ✔️ id
language string ✔️ language

Response

*operations.GetSeasonTranslationResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 400-600 /

GetSeasonTypes

Returns season type records

Example Usage

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
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.

Response

*operations.GetSeasonTypesResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 400-600 /