-
Notifications
You must be signed in to change notification settings - Fork 3
/
feature.go
32 lines (25 loc) · 942 Bytes
/
feature.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"
)
// FetchFeatured List of songs hand-picked and arranged by KKBOX editors.
func (b *Box) FetchFeatured(params ...Param) (*GroupListData, error) {
resp := new(GroupListData)
url := FeaturedPlayListURL
err := b.fetchData(url, resp, params...)
return resp, err
}
// FetchFeaturedPlayList retrieve information of the featured playlist with {playlist_id}.
func (b *Box) FetchFeaturedPlayList(playList string, params ...Param) (*PlayListData, error) {
resp := new(PlayListData)
url := fmt.Sprintf(FeaturedSinglePlayListURL, playList)
err := b.fetchData(url, resp, params...)
return resp, err
}
// FetchFeaturedPlayListTrack list the songs of a featured playlist.
func (b *Box) FetchFeaturedPlayListTrack(playList string, params ...Param) (*TrackData, error) {
resp := new(TrackData)
url := fmt.Sprintf(FeaturedPlayListTrackURL, playList)
err := b.fetchData(url, resp, params...)
return resp, err
}