-
Notifications
You must be signed in to change notification settings - Fork 9
/
XiamiContentSongsInfoGetAPIRequest.go
51 lines (43 loc) · 1.26 KB
/
XiamiContentSongsInfoGetAPIRequest.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
47
48
49
50
51
package xiamicontent
import (
"net/url"
"github.com/bububa/opentaobao/model"
)
// XiamiContentSongsInfoGetAPIRequest 获取歌曲信息 API请求
// xiami.content.songs.info.get
//
// (批量)获取歌曲信息
type XiamiContentSongsInfoGetAPIRequest struct {
model.Params
// 歌曲ID
_songIds []int64
}
// NewXiamiContentSongsInfoGetRequest 初始化XiamiContentSongsInfoGetAPIRequest对象
func NewXiamiContentSongsInfoGetRequest() *XiamiContentSongsInfoGetAPIRequest {
return &XiamiContentSongsInfoGetAPIRequest{
Params: model.NewParams(),
}
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r XiamiContentSongsInfoGetAPIRequest) GetApiMethodName() string {
return "xiami.content.songs.info.get"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r XiamiContentSongsInfoGetAPIRequest) GetApiParams() url.Values {
params := url.Values{}
for k, v := range r.GetRawParams() {
params.Set(k, v.String())
}
return params
}
// SetSongIds is SongIds Setter
// 歌曲ID
func (r *XiamiContentSongsInfoGetAPIRequest) SetSongIds(_songIds []int64) error {
r._songIds = _songIds
r.Set("song_ids", _songIds)
return nil
}
// GetSongIds SongIds Getter
func (r XiamiContentSongsInfoGetAPIRequest) GetSongIds() []int64 {
return r._songIds
}