-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcategory.go
32 lines (25 loc) · 932 Bytes
/
category.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
package kkbox
import (
"fmt"
)
// FetchFeaturedCategory List of featured playlist categories.
func (b *Box) FetchFeaturedCategory(params ...Param) (*GroupListData, error) {
resp := new(GroupListData)
url := FeaturedCategoryURL
err := b.fetchData(url, resp, params...)
return resp, err
}
// FetchSingleFeaturedCategory get a featured playlist category.
func (b *Box) FetchSingleFeaturedCategory(id string, params ...Param) (*CategoryListData, error) {
resp := new(CategoryListData)
url := fmt.Sprintf(FeaturedSingleCategoryURL, id)
err := b.fetchData(url, resp, params...)
return resp, err
}
// FetchFeaturedCategoryPlayList list of playlists of a featured playlist category.
func (b *Box) FetchFeaturedCategoryPlayList(id string, params ...Param) (*GroupListData, error) {
resp := new(GroupListData)
url := fmt.Sprintf(FeaturedCategoryPlayListURL, id)
err := b.fetchData(url, resp, params...)
return resp, err
}