-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcategory_v1.go
46 lines (41 loc) · 1.2 KB
/
category_v1.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package kickcom
import (
"context"
"net/http"
)
// CategoryV1Short is a representation of a category essentials in the API v1.
type CategoryV1Short struct {
ID uint64 `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
Icon string `json:"icon,omitempty"`
IsMature bool `json:"is_mature"`
}
// CategoryV1 is a full representation of a category in the API v1.
type CategoryV1 struct {
ID uint64 `json:"id"`
CategoryID uint64 `json:"category_id"`
Name string `json:"name"`
Slug string `json:"slug"`
Tags []string `json:"tags"`
Description any `json:"description"`
DeletedAt any `json:"deleted_at"`
Viewers uint64 `json:"viewers"`
Category CategoryV1Short `json:"category"`
}
// CategoriesV1Reply is the response provided by GetCategoriesV1
type CategoriesV1Reply []CategoryV1Short
// GetCategoriesV1 returns the list of available categories.
func (k *Kick) GetSubcategoriesV1(
ctx context.Context,
) (*CategoriesV1Reply, error) {
return Request[CategoriesV1Reply](
ctx,
k,
http.MethodGet,
RouteSubcategoriesAll,
RouteVars{},
nil,
NoBody,
)
}