(UserInfo)
- GetUserInfo - returns user info
- GetUserInfoByID - returns user info by user id
returns user info
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
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
*operations.GetUserInfoResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 400-600 | / |
returns user info by user id
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
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
id |
int64 | ✔️ | id |
*operations.GetUserInfoByIDResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 400-600 | / |