(Companies)
- GetAllCompanies - returns a paginated list of company records
- GetCompany - returns a company record
- GetCompanyTypes - returns all company type records
returns a paginated list of company records
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 page *float64 = openapi.Float64(2609.1)
ctx := context.Background()
res, err := s.Companies.GetAllCompanies(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 |
*float64 | ➖ | name |
*operations.GetAllCompaniesResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
returns a company 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: "<YOUR_BEARER_TOKEN_HERE>",
}),
)
var id float64 = 310.35
ctx := context.Background()
res, err := s.Companies.GetCompany(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 |
float64 | ✔️ | id |
*operations.GetCompanyResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
returns all company type records
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>",
}),
)
ctx := context.Background()
res, err := s.Companies.GetCompanyTypes(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.GetCompanyTypesResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |