-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrelease.go
More file actions
32 lines (25 loc) · 936 Bytes
/
release.go
File metadata and controls
32 lines (25 loc) · 936 Bytes
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"
)
// FetchReleaseCategory List of new release categories.
func (b *Box) FetchReleaseCategory(params ...Param) (*ReleaseCategoryList, error) {
resp := new(ReleaseCategoryList)
url := ReleaseCategoryURL
err := b.fetchData(url, resp, params...)
return resp, err
}
// FetchSingleReleaseCategory retrieve information of the new release category with {category_id}.
func (b *Box) FetchSingleReleaseCategory(id string, params ...Param) (*AlbumList, error) {
resp := new(AlbumList)
url := fmt.Sprintf(ReleaseSingleCategoryURL, id)
err := b.fetchData(url, resp, params...)
return resp, err
}
// FetchReleaseCategoryAlbum list of albums of a new release category.
func (b *Box) FetchReleaseCategoryAlbum(id string, params ...Param) (*ArtistAlbumData, error) {
resp := new(ArtistAlbumData)
url := fmt.Sprintf(ReleaseCategoryAlbumURL, id)
err := b.fetchData(url, resp, params...)
return resp, err
}