Skip to content

Latest commit

 

History

History
105 lines (81 loc) · 3.88 KB

README.md

File metadata and controls

105 lines (81 loc) · 3.88 KB

AwardCategories

(AwardCategories)

Available Operations

GetAwardCategory

Returns a single award category 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: "<YOUR_BEARER_TOKEN_HERE>",
        }),
    )
    var id float64 = 6788.97
    ctx := context.Background()
    res, err := s.AwardCategories.GetAwardCategory(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 float64 ✔️ id

Response

*operations.GetAwardCategoryResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /

GetAwardCategoryExtended

Returns a single award category 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: "<YOUR_BEARER_TOKEN_HERE>",
        }),
    )
    var id float64 = 4271.53
    ctx := context.Background()
    res, err := s.AwardCategories.GetAwardCategoryExtended(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 float64 ✔️ id

Response

*operations.GetAwardCategoryExtendedResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /