Skip to content

Latest commit

 

History

History
109 lines (79 loc) · 3.39 KB

README.md

File metadata and controls

109 lines (79 loc) · 3.39 KB

UserInfo

(UserInfo)

Available Operations

GetUserInfo

returns user info

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.UserInfo.GetUserInfo(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.GetUserInfoResponse, error

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

GetUserInfoByID

returns user info by user id

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 = 339298

    ctx := context.Background()
    res, err := s.UserInfo.GetUserInfoByID(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.GetUserInfoByIDResponse, error

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