Documentation
¶
Index ¶
- Constants
- Variables
- func AddComment(data utils.RequestData, config CommentConfig) (result types.AddCommentData, err error)
- func AddPlaylistTracks(data utils.RequestData, musicIds []int, playlistID int) (result types.PlaylistTracksData, err error)
- func CheckQrLogin(data utils.RequestData, key string) (result types.QrCheckData, header http.Header, err error)
- func CreateAlbumDetailReqJson(albumID int) string
- func CreateCheckQrLoginJson(key string) string
- func CreateCommentJson(config CommentConfig) string
- func CreateDelEventReqJson(eventID int) string
- func CreateDelPlaylistReqJson(playlistID int) string
- func CreateEventImgReqJson(imgID, imgSubtype string) string
- func CreateEventPicsJson(picData []types.UploadEventImgData) string
- func CreateEventReqJson(text, pics string) string
- func CreateGetCommentJson(config GetCommentConfig) string
- func CreateGetQrUnikeyJson() string
- func CreateMlogNosTokenReqJson(filePath string) (string, []byte, error)
- func CreateNewPlaylistReqJson(name string, privacy int) string
- func CreateNosTokenReqJson(filePath string) (string, []byte, error)
- func CreateObtainCloudbeanReqJson(userMissionID, period int) string
- func CreatePicMlogReqJson(text string, songInfo types.SongDetailData, picData []MlogPic) string
- func CreatePicMsgReqJson(userIDs []int, picData types.NosTokenData, picFile []byte) (string, error)
- func CreatePlayListTracksReqJson(musicIds []int, playlistID, operation int) string
- func CreatePlaylistDetailReqJson(id int) string
- func CreateSearchComplexReqJson(keyword string) string
- func CreateSearchMultiReqJson(keyword string) string
- func CreateSearchSongReqJson(config SearchSongConfig) string
- func CreateSearchSuggestReqJson(keyword string) string
- func CreateShortUrlJson(url string) string
- func CreateSongDetailReqJson(ids []int) string
- func CreateSongLikeReqJson(musicID int, isLike bool) string
- func CreateSongURLJson(config SongURLConfig) string
- func CreateTextMsgReqJson(userIDs []int, msg string) string
- func CreateUserPlaylistReqJson(config UserPlaylistConfig) string
- func CreateUserSignReqJson(signType int) string
- func DelComment(data utils.RequestData, config CommentConfig) (result types.DelCommentData, err error)
- func DelEvent(data utils.RequestData, eventID int) (result types.DelEventData, err error)
- func DelPlaylist(data utils.RequestData, playlistID int) (result types.DelPlaylistData, err error)
- func DelPlaylistTracks(data utils.RequestData, trackIds []int, playlistID int) (result types.PlaylistTracksData, err error)
- func GetAlbumDetail(data utils.RequestData, albumID int) (result types.NewPlaylistData, err error)
- func GetCloudbeanNum(data utils.RequestData) (result types.CloudBeanNumData, err error)
- func GetComment(data utils.RequestData, config GetCommentConfig) (result types.GetCommentData, err error)
- func GetLoginStatus(data utils.RequestData) (result types.LoginStatusData, err error)
- func GetMlogNosToken(data utils.RequestData, filePath string) (result types.NosTokenData, file []byte, err error)
- func GetMusicianTasks(data utils.RequestData) (result types.MusicianTasksData, err error)
- func GetNosToken(data utils.RequestData, filePath string) (result types.NosTokenData, file []byte, err error)
- func GetPlaylistDetail(data utils.RequestData, id int) (result types.PlaylistDetailData, err error)
- func GetQrUnikey(data utils.RequestData) (result types.QrUnikeyData, err error)
- func GetRecommendSongs(data utils.RequestData) (result types.RecommendSongsData, err error)
- func GetSearchSuggest(data utils.RequestData, keyword string) (result types.SearchSuggestData, err error)
- func GetSongDetail(data utils.RequestData, ids []int) (result types.SongsDetailData, err error)
- func GetSongURL(data utils.RequestData, config SongURLConfig) (result types.SongsURLData, err error)
- func GetUploadNode() (result types.UploadNodeData, err error)
- func GetUserDetail(data utils.RequestData, userID int) (result types.UserDetailData, err error)
- func GetUserInfo(data utils.RequestData) (result types.UserInfoData, err error)
- func GetUserPlaylist(data utils.RequestData, config UserPlaylistConfig) (result types.UserPlaylistData, err error)
- func GetUserSetting(data utils.RequestData) (result types.UserSettingData, err error)
- func MusicianSign(data utils.RequestData) (result types.MusicianSignData, err error)
- func NewPlaylist(data utils.RequestData, name string, privacy int) (result types.NewPlaylistData, err error)
- func NewShortURL(data utils.RequestData, url string) (result types.ShortURLData, err error)
- func ObtainCloudbean(data utils.RequestData, userMissionID, period int) (result types.ObtainCloudebeanData, err error)
- func ReplyComment(data utils.RequestData, config CommentConfig) (result types.ReplyCommentData, err error)
- func SearchComplex(data utils.RequestData, keyword string) (result types.SearchComplexData, err error)
- func SearchMultiMatch(data utils.RequestData, keyword string) (result types.SearchMultiMatchData, err error)
- func SearchSong(data utils.RequestData, config SearchSongConfig) (result types.SearchSongData, err error)
- func SendEvent(data utils.RequestData, text string, picPath []string) (result types.SendEventData, err error)
- func SendPicMlog(data utils.RequestData, text string, songID int, picPath []string) (result types.SendMlogData, err error)
- func SendPicMsg(data utils.RequestData, userIDs []int, picPath string) (result types.SendMsgData, err error)
- func SendTextMsg(data utils.RequestData, userIDs []int, text string) (result types.SendMsgData, err error)
- func SongLike(data utils.RequestData, musicID int, isLike bool) (result types.SongLikeData, err error)
- func UploadEventImg(data utils.RequestData, imgID, imgType string) (result types.UploadEventImgData, err error)
- func UploadFile(data utils.RequestData, file []byte, nosToken types.NosTokenData) (result types.UploadFileData, err error)
- func UserSign(data utils.RequestData, signType int) (result types.UserSignData, err error)
- type AlbumDetailReq
- type Batch
- type BatchAPI
- type CheckQrLoginReq
- type CommentConfig
- type CommentReq
- type DelEventReq
- type DelPlaylistReq
- type EventImgReq
- type EventPic
- type GetCommentConfig
- type GetCommentReq
- type MlogNosTokenReq
- type MlogPic
- type MsgPicInfo
- type NewPlaylistReq
- type NosTokenReq
- type ObtainCloudbeanReqJson
- type PlayListTracksReq
- type PlaylistDetailReq
- type QrUniKeyReq
- type SearchComplexReq
- type SearchMultiReq
- type SearchSongConfig
- type SearchSongReq
- type SearchSuggestReq
- type SendEventReq
- type SendMlogReqJson
- type SendMsgReq
- type SendPicMsgReq
- type ShortUrlReq
- type SongDetailReq
- type SongLikeReq
- type SongURLConfig
- type SongUrlReq
- type UserPlaylistConfig
- type UserPlaylistReq
- type UserSignReqJson
Constants ¶
const ( // ResTypeMusic 歌曲 ResTypeMusic = "R_SO_4" // ResTypeMV MV ResTypeMV = "R_MV_5" // ResTypePlaylist 歌单 ResTypePlaylist = "A_PL_0" // ResTypeAlbum 专辑 ResTypeAlbum = "R_AL_3" // ResTypeRadio 电台 ResTypeRadio = "A_DJ_1" // ResTypeVideo 视频 ResTypeVideo = "R_VI_62" // ResTypeMlog Mlog ResTypeMlog = "R_MLOG_1001" // ResTypeEvent 动态 ResTypeEvent = "A_EV_2" )
const AddCommentAPI = "/api/v1/resource/comments/add"
AddCommentAPI 新增评论 API
const AlbumDetailAPI = "/api/album/v3/detail"
AlbumDetailAPI 获取专辑详细 API
const CloudbeanNumAPI = "/api/cloudbean/get"
CloudbeanNumAPI 获取音乐人云豆数量 API
const DelCommentAPI = "/api/resource/comments/delete"
DelCommentAPI 删除评论 API
const DelEventAPI = "/api/event/delete"
DelEventAPI 删除动态 API
const DelPlayListAPI = "/api/playlist/delete"
DelPlayListAPI 删除歌单 API
const GetCommentAPI = "/api/v2/resource/comments"
GetCommentAPI 获取评论 API
const LoginStatusAPI = "/api/w/nuser/account/get"
LoginStatusAPI 获取账号登录状态 API
const MusicianSignAPI = "/api/creator/user/access"
MusicianSignAPI 音乐人签到 API
const MusicianTasksAPI = "/api/nmusician/workbench/mission/cycle/list"
MusicianTasksAPI 获取音乐人任务列表 API
const NewPlayListAPI = "/api/playlist/create"
NewPlayListAPI 新建歌单 API
const NosTokenAPI = "/api/nos/token/alloc"
NosTokenAPI 获取 NosToken API (用于文件上传)
const ObtainCloudbeanAPI = "/api/nmusician/workbench/mission/reward/obtain/new"
ObtainCloudbeanAPI 领取云豆 API
const PlaylistDetailAPI = "/api/v6/playlist/detail"
PlaylistDetailAPI 歌单详细信息 API
const PlaylistTracksAPI = "/api/playlist/manipulate/tracks"
PlaylistTracksAPI 管理歌单歌曲 API
const QrLoginAPI = "/api/login/qrcode/client/login"
QrLoginAPI 检查 QR 登录状态 API
const QrUnikeyAPI = "/api/login/qrcode/unikey"
QrUnikeyAPI 获取 QR 登录的 unikey
const RecommendSongsAPI = "/api/v3/discovery/recommend/songs"
RecommendSongsAPI 获取日推歌曲 API
const ReplyCommentAPI = "/api/v1/resource/comments/reply"
ReplyCommentAPI 回复评论 API
const SearchComplexAPI = "/api/search/complex/get/v2"
SearchComplexAPI 复杂搜索 API
const SearchMultiAPI = "/api/search/suggest/multimatch"
SearchMultiAPI 搜索多重匹配 API
const SearchSongAPI = "/api/v1/search/song/get"
SearchSongAPI 歌曲搜索 API
const SearchSuggestAPI = "/api/search/suggest/keyword"
SearchSuggestAPI 获取搜索建议 API
const SendEventAPI = "/api/share/friends/resource"
SendEventAPI 发送动态 API
const SendMlogAPI = "/api/mlog/publish/v1"
SendMlogAPI 发送 Mlog API
const SendMsgAPI = "/api/msg/private/send"
SendMsgAPI 发送私信 API
const ShortUrlAPI = "/api/middle/shorturl/generate"
ShortUrlAPI 短链接 API
const SongDetailAPI = "/api/v3/song/detail"
SongDetailAPI 歌曲详细信息 API
const SongLikeAPI = "/api/song/like"
SongLikeAPI 添加/删除红心歌曲 API
const SongUrlAPI = "/api/song/enhance/player/url/v1"
SongUrlAPI 歌曲 URl API
const UploadEventImgAPI = "/api/upload/event/img/v1"
UploadEventImgAPI 获取用于发送动态的图片信息
const UserDetailAPI = "/api/v1/user/detail"
UserDetailAPI 用户详细信息 API
const UserInfoAPI = "/api/v1/user/info"
UserInfoAPI 用户信息 API
const UserPlaylistAPI = "/api/user/playlist"
UserPlaylistAPI 获取用户歌单 API
const UserSettingAPI = "/api/user/setting"
UserSettingAPI 用户设置 API
const UserSignAPI = "/api/point/dailyTask"
UserSignAPI 用户签到 API
Variables ¶
var UploadNode string
UploadNode 上传文件节点
Functions ¶
func AddComment ¶
func AddComment(data utils.RequestData, config CommentConfig) (result types.AddCommentData, err error)
AddComment 新增评论
func AddPlaylistTracks ¶ added in v0.1.11
func AddPlaylistTracks(data utils.RequestData, musicIds []int, playlistID int) (result types.PlaylistTracksData, err error)
AddPlaylistTracks 向歌单中添加歌曲
func CheckQrLogin ¶
func CheckQrLogin(data utils.RequestData, key string) (result types.QrCheckData, header http.Header, err error)
CheckQrLogin 检查 QR 登录状态
func CreateAlbumDetailReqJson ¶ added in v0.1.10
CreateAlbumDetailReqJson 创建请求 body json
func CreateCheckQrLoginJson ¶ added in v0.1.10
CreateCheckQrLoginJson 创建请求 body json
func CreateCommentJson ¶
func CreateCommentJson(config CommentConfig) string
CreateCommentJson 创建请求 body json
func CreateDelEventReqJson ¶
CreateDelEventReqJson 创建请求 body json
func CreateDelPlaylistReqJson ¶ added in v0.1.10
CreateDelPlaylistReqJson 创建请求 body json
func CreateEventImgReqJson ¶
CreateEventImgReqJson 创建请求 body json
func CreateEventPicsJson ¶
func CreateEventPicsJson(picData []types.UploadEventImgData) string
CreateEventPicsJson 创建动态图片数据 json
func CreateEventReqJson ¶
CreateEventReqJson 创建请求 body json
func CreateGetCommentJson ¶ added in v0.1.11
func CreateGetCommentJson(config GetCommentConfig) string
CreateGetCommentJson 创建请求 body json
func CreateGetQrUnikeyJson ¶ added in v0.1.10
func CreateGetQrUnikeyJson() string
CreateGetQrUnikeyJson 创建请求 body json
func CreateMlogNosTokenReqJson ¶
CreateMlogNosTokenReqJson 创建请求 body json
func CreateNewPlaylistReqJson ¶ added in v0.1.10
CreateNewPlaylistReqJson 创建请求 body json
func CreateNosTokenReqJson ¶
CreateNosTokenReqJson 创建请求 body json
func CreateObtainCloudbeanReqJson ¶
CreateObtainCloudbeanReqJson 创建请求 json
func CreatePicMlogReqJson ¶
func CreatePicMlogReqJson(text string, songInfo types.SongDetailData, picData []MlogPic) string
CreatePicMlogReqJson 创建请求 body json
func CreatePicMsgReqJson ¶
CreatePicMsgReqJson 创建请求 body json
func CreatePlayListTracksReqJson ¶ added in v0.1.11
CreatePlayListTracksReqJson 创建请求 body json, operation: 1为添加, 0或其他值为删除
func CreatePlaylistDetailReqJson ¶ added in v0.1.5
CreatePlaylistDetailReqJson 创建请求 body json
func CreateSearchComplexReqJson ¶ added in v0.1.11
CreateSearchComplexReqJson 创建请求 body json
func CreateSearchMultiReqJson ¶ added in v0.1.11
CreateSearchMultiReqJson 创建请求 body json
func CreateSearchSongReqJson ¶ added in v0.1.11
func CreateSearchSongReqJson(config SearchSongConfig) string
CreateSearchSongReqJson 创建请求 body json
func CreateSearchSuggestReqJson ¶ added in v0.1.11
CreateSearchSuggestReqJson 创建请求 body json
func CreateShortUrlJson ¶ added in v0.1.6
CreateShortUrlJson 创建请求 body json
func CreateSongDetailReqJson ¶
CreateSongDetailReqJson 创建请求 body json
func CreateSongLikeReqJson ¶ added in v0.1.11
CreateSongLikeReqJson 创建请求 body json
func CreateSongURLJson ¶
func CreateSongURLJson(config SongURLConfig) string
CreateSongURLJson 创建请求 body json
func CreateTextMsgReqJson ¶
CreateTextMsgReqJson 创建请求 body json
func CreateUserPlaylistReqJson ¶ added in v0.1.10
func CreateUserPlaylistReqJson(config UserPlaylistConfig) string
CreateUserPlaylistReqJson 创建请求 body json
func CreateUserSignReqJson ¶
CreateUserSignReqJson 创建请求 json
func DelComment ¶
func DelComment(data utils.RequestData, config CommentConfig) (result types.DelCommentData, err error)
DelComment 删除评论
func DelEvent ¶
func DelEvent(data utils.RequestData, eventID int) (result types.DelEventData, err error)
DelEvent 删除动态
func DelPlaylist ¶ added in v0.1.10
func DelPlaylist(data utils.RequestData, playlistID int) (result types.DelPlaylistData, err error)
DelPlaylist 删除歌单
func DelPlaylistTracks ¶ added in v0.1.11
func DelPlaylistTracks(data utils.RequestData, trackIds []int, playlistID int) (result types.PlaylistTracksData, err error)
DelPlaylistTracks 删除歌单歌曲
func GetAlbumDetail ¶ added in v0.1.10
func GetAlbumDetail(data utils.RequestData, albumID int) (result types.NewPlaylistData, err error)
GetAlbumDetail 获取专辑信息
func GetCloudbeanNum ¶
func GetCloudbeanNum(data utils.RequestData) (result types.CloudBeanNumData, err error)
GetCloudbeanNum 获取音乐人云豆数量
func GetComment ¶ added in v0.1.11
func GetComment(data utils.RequestData, config GetCommentConfig) (result types.GetCommentData, err error)
GetComment 获取评论
func GetLoginStatus ¶
func GetLoginStatus(data utils.RequestData) (result types.LoginStatusData, err error)
GetLoginStatus 获取账号登录状态
func GetMlogNosToken ¶
func GetMlogNosToken(data utils.RequestData, filePath string) (result types.NosTokenData, file []byte, err error)
GetMlogNosToken 获取用于 Mlog 的 NosToken
func GetMusicianTasks ¶
func GetMusicianTasks(data utils.RequestData) (result types.MusicianTasksData, err error)
GetMusicianTasks 获取音乐人任务列表
func GetNosToken ¶
func GetNosToken(data utils.RequestData, filePath string) (result types.NosTokenData, file []byte, err error)
GetNosToken 获取 NosToken
func GetPlaylistDetail ¶ added in v0.1.5
func GetPlaylistDetail(data utils.RequestData, id int) (result types.PlaylistDetailData, err error)
GetPlaylistDetail 获取歌单详细信息
func GetQrUnikey ¶
func GetQrUnikey(data utils.RequestData) (result types.QrUnikeyData, err error)
GetQrUnikey 获取 QR 登录的 unikey
func GetRecommendSongs ¶ added in v0.1.14
func GetRecommendSongs(data utils.RequestData) (result types.RecommendSongsData, err error)
GetRecommendSongs 获取日推歌曲
func GetSearchSuggest ¶ added in v0.1.11
func GetSearchSuggest(data utils.RequestData, keyword string) (result types.SearchSuggestData, err error)
GetSearchSuggest 获取搜索建议
func GetSongDetail ¶
func GetSongDetail(data utils.RequestData, ids []int) (result types.SongsDetailData, err error)
GetSongDetail 获取歌曲详细信息
func GetSongURL ¶
func GetSongURL(data utils.RequestData, config SongURLConfig) (result types.SongsURLData, err error)
GetSongURL 获取歌曲 URL
func GetUploadNode ¶
func GetUploadNode() (result types.UploadNodeData, err error)
GetUploadNode 获取上传加速节点地址
func GetUserDetail ¶
func GetUserDetail(data utils.RequestData, userID int) (result types.UserDetailData, err error)
GetUserDetail 获取用户详细信息
func GetUserInfo ¶
func GetUserInfo(data utils.RequestData) (result types.UserInfoData, err error)
GetUserInfo 获取用户信息
func GetUserPlaylist ¶ added in v0.1.10
func GetUserPlaylist(data utils.RequestData, config UserPlaylistConfig) (result types.UserPlaylistData, err error)
GetUserPlaylist 获取用户歌单
func GetUserSetting ¶
func GetUserSetting(data utils.RequestData) (result types.UserSettingData, err error)
GetUserSetting 获取用户信息
func MusicianSign ¶
func MusicianSign(data utils.RequestData) (result types.MusicianSignData, err error)
MusicianSign 音乐人签到
func NewPlaylist ¶ added in v0.1.10
func NewPlaylist(data utils.RequestData, name string, privacy int) (result types.NewPlaylistData, err error)
NewPlaylist 新建歌单
func NewShortURL ¶ added in v0.1.10
func NewShortURL(data utils.RequestData, url string) (result types.ShortURLData, err error)
NewShortURL 获取短连接 (只支持 *.163.com *.126.net)
func ObtainCloudbean ¶
func ObtainCloudbean(data utils.RequestData, userMissionID, period int) (result types.ObtainCloudebeanData, err error)
ObtainCloudbean 领取云豆, userMissionID, period 需通过 GetMusicianTasks 获取
func ReplyComment ¶
func ReplyComment(data utils.RequestData, config CommentConfig) (result types.ReplyCommentData, err error)
ReplyComment 回复评论
func SearchComplex ¶ added in v0.1.11
func SearchComplex(data utils.RequestData, keyword string) (result types.SearchComplexData, err error)
SearchComplex 复杂搜索
func SearchMultiMatch ¶ added in v0.1.11
func SearchMultiMatch(data utils.RequestData, keyword string) (result types.SearchMultiMatchData, err error)
SearchMultiMatch 搜索多重匹配
func SearchSong ¶ added in v0.1.11
func SearchSong(data utils.RequestData, config SearchSongConfig) (result types.SearchSongData, err error)
SearchSong 歌曲搜索
func SendEvent ¶
func SendEvent(data utils.RequestData, text string, picPath []string) (result types.SendEventData, err error)
SendEvent 发送动态(可以带图片)
func SendPicMlog ¶
func SendPicMlog(data utils.RequestData, text string, songID int, picPath []string) (result types.SendMlogData, err error)
SendPicMlog 发送图片 Mlog
func SendPicMsg ¶
func SendPicMsg(data utils.RequestData, userIDs []int, picPath string) (result types.SendMsgData, err error)
SendPicMsg 发送图片私信
func SendTextMsg ¶
func SendTextMsg(data utils.RequestData, userIDs []int, text string) (result types.SendMsgData, err error)
SendTextMsg 发送文本私信
func SongLike ¶ added in v0.1.11
func SongLike(data utils.RequestData, musicID int, isLike bool) (result types.SongLikeData, err error)
SongLike 红心/取消红心歌曲
func UploadEventImg ¶
func UploadEventImg(data utils.RequestData, imgID, imgType string) (result types.UploadEventImgData, err error)
UploadEventImg 获取用于发送动态的图片信息
func UploadFile ¶
func UploadFile(data utils.RequestData, file []byte, nosToken types.NosTokenData) (result types.UploadFileData, err error)
UploadFile 上传文件
func UserSign ¶
func UserSign(data utils.RequestData, signType int) (result types.UserSignData, err error)
UserSign 用户签到, signType 签到类型 ,默认 0 ,其中0 为安卓端签到 ,1 为 web/PC 签到
Types ¶
type AlbumDetailReq ¶ added in v0.1.10
type AlbumDetailReq struct { Id int `json:"id"` CacheKey string `json:"cache_key"` ER string `json:"e_r"` Header string `json:"header"` }
AlbumDetailReq NewPlaylist API 的 body json
type CheckQrLoginReq ¶
type CheckQrLoginReq struct { Key string `json:"key"` Type string `json:"type"` ER bool `json:"e_r"` Header string `json:"header"` }
CheckQrLoginReq CheckQrLogin API 的 body json
type CommentConfig ¶
type CommentConfig struct { // ResType 对应常量 ResTypeXXX ResType string // ResID 资源 ID ResID int // CommentID 评论 ID CommentID int // ForwardEvent 是否转发到动态, 只在发送或回复评论时有效 ForwardEvent bool // Content 评论内容 Content string }
CommentConfig 回复/发送/删除评论参数.
type CommentReq ¶
type CommentReq struct { ForwardEvent string `json:"forwardEvent"` ThreadId string `json:"threadId"` CommentId string `json:"commentId"` Content string `json:"content"` Header string `json:"header"` ER string `json:"e_r"` }
CommentReq 评论 API 的 body json
type DelEventReq ¶
type DelEventReq struct { ID string `json:"id"` Header string `json:"header"` ER string `json:"e_r"` }
DelEventReq DelEvent API 的 body json
type DelPlaylistReq ¶ added in v0.1.10
type DelPlaylistReq struct { Pid int `json:"pid"` Header string `json:"header"` ER string `json:"e_r"` }
DelPlaylistReq DelPlaylist API 的 body json
type EventImgReq ¶
type EventImgReq struct { ImgID string `json:"imgid"` Format string `json:"format"` Header string `json:"header"` ER string `json:"e_r"` }
EventImgReq UploadEventImgAPI 的请求 body json
type EventPic ¶
type EventPic struct { OriginId int `json:"originId"` SquareId int `json:"squareId"` RectangleId int `json:"rectangleId"` Format string `json:"format"` }
EventPic 用于发送动态的图片数据
type GetCommentConfig ¶ added in v0.1.11
type GetCommentConfig struct { // ResType 对应常量 ResTypeXXX ResType string // ResID 资源 ID ResID int // PageNo 分页参数,第N页,默认为1 PageNo int // PageSize 分页参数,每页多少条数据,默认20 PageSize int // SortType 排序方式,99:按推荐排序,2:按热度排序,3:按时间排序,默认为99 SortType int // Cursor 当sortType为3时且页数不是第一页时需传入,值为上一条数据的time Cursor int }
GetCommentConfig 获取评论参数
type GetCommentReq ¶ added in v0.1.11
type GetCommentReq struct { Cursor int `json:"cursor"` PageNo int `json:"pageNo"` PageSize int `json:"pageSize"` ShowInner bool `json:"showInner"` SortType int `json:"sortType"` ThreadId string `json:"threadId"` Header string `json:"header"` ER string `json:"e_r"` }
GetCommentReq 获取评论 API 的 body json
type MlogNosTokenReq ¶
type MlogNosTokenReq struct { BizKey string `json:"bizKey"` Filename string `json:"filename"` Bucket string `json:"bucket"` Md5 string `json:"md5"` Type string `json:"type"` FileSize int `json:"fileSize"` Header string `json:"header"` ER string `json:"e_r"` }
MlogNosTokenReq 获取 NosToken 的 body json
type MlogPic ¶
type MlogPic struct { Height int `json:"height"` More bool `json:"more"` NosKey string `json:"nosKey"` PicKey string `json:"picKey"` Width int `json:"width"` }
MlogPic Mlog 的图片对象
func NewMlogPicObj ¶ added in v0.1.10
func NewMlogPicObj(picFile []byte, picData types.NosTokenData) (MlogPic, error)
NewMlogPicObj 创建 Mlog 图片对象
type MsgPicInfo ¶
type MsgPicInfo struct { PicIdStr string `json:"picIdStr"` Width int `json:"width"` Height int `json:"height"` Format string `json:"format"` Type int `json:"type"` }
MsgPicInfo 发送私信的图片信息
type NewPlaylistReq ¶ added in v0.1.10
type NewPlaylistReq struct { Name string `json:"name"` // Privacy 是否设置为隐私歌单,默认否,传'10'则设置成隐私歌单 Privacy int `json:"privacy"` Header string `json:"header"` ER string `json:"e_r"` }
NewPlaylistReq NewPlaylist API 的 body json
type NosTokenReq ¶
type NosTokenReq struct { Filename string `json:"filename"` Local string `json:"local"` NosProduct int `json:"nos_product"` FileSize int `json:"fileSize"` Type string `json:"type"` Md5 string `json:"md5"` Ext string `json:"ext"` Header string `json:"header"` ER string `json:"e_r"` }
NosTokenReq 获取 NosToken 的 body json
type ObtainCloudbeanReqJson ¶
type ObtainCloudbeanReqJson struct { UserMissionId int `json:"userMissionId"` Period int `json:"period"` }
ObtainCloudbeanReqJson 领取云豆参数
type PlayListTracksReq ¶ added in v0.1.11
type PlayListTracksReq struct { TrackIds []int `json:"trackIds"` Pid int `json:"pid"` Op string `json:"op"` Imme string `json:"imme"` ER string `json:"e_r"` Header string `json:"header"` }
PlayListTracksReq PlaylistTracks API 的 body json
type PlaylistDetailReq ¶ added in v0.1.5
type PlaylistDetailReq struct { Id string `json:"id"` T string `json:"t"` N string `json:"n"` S string `json:"s"` Header string `json:"header"` ER string `json:"e_r"` }
PlaylistDetailReq PlaylistDetail API 的 body json
type QrUniKeyReq ¶
type QrUniKeyReq struct { Type string `json:"type"` ER bool `json:"e_r"` Header string `json:"header"` }
QrUniKeyReq QrUnikey API 的 body json
type SearchComplexReq ¶ added in v0.1.11
type SearchComplexReq struct { Keyword string `json:"keyword"` Header string `json:"header"` ER string `json:"e_r"` }
SearchComplexReq SearchComplex API 的 body json
type SearchMultiReq ¶ added in v0.1.11
type SearchMultiReq struct { Limit int `json:"limit"` S string `json:"s"` Header string `json:"header"` ER string `json:"e_r"` }
SearchMultiReq SearchMulti API 的 body json
type SearchSongConfig ¶ added in v0.1.14
type SearchSongConfig struct { // Keyword 搜索关键词 Keyword string // Limit 最大返回结果个数 (默认为20) Limit int // Offset 偏移数量, 用于分页 (默认为0) Offset int }
SearchSongConfig 搜索歌曲参数
type SearchSongReq ¶ added in v0.1.11
type SearchSongReq struct { S string `json:"s"` Offset int `json:"offset"` Limit int `json:"limit"` Header string `json:"header"` ER string `json:"e_r"` }
SearchSongReq 歌曲搜索
type SearchSuggestReq ¶ added in v0.1.11
type SearchSuggestReq struct { S string `json:"s"` Limit int `json:"limit"` Header string `json:"header"` ER string `json:"e_r"` }
SearchSuggestReq SearchSuggest API 的 body json
type SendEventReq ¶
type SendEventReq struct { Msg string `json:"msg"` Type string `json:"type"` UUID string `json:"uuid"` Pics string `json:"pics"` AddComment string `json:"addComment"` Header string `json:"header"` ER string `json:"e_r"` }
SendEventReq SendEvent API 的 body json
type SendMlogReqJson ¶
type SendMlogReqJson struct { Type string `json:"type"` Mlog string `json:"mlog"` Header string `json:"header"` ER string `json:"e_r"` }
SendMlogReqJson 发送 Mlog 请求 json
type SendMsgReq ¶
type SendMsgReq struct { UserIds string `json:"userIds"` Msg string `json:"msg"` Type string `json:"type"` Header string `json:"header"` ER string `json:"e_r"` }
SendMsgReq 发送私信 API 的 body json
type SendPicMsgReq ¶
type SendPicMsgReq struct { UserIds string `json:"userIds"` PicInfo string `json:"picinfo"` Type string `json:"type"` Header string `json:"header"` ER string `json:"e_r"` }
SendPicMsgReq 发送图片私信 API 的 body json
type ShortUrlReq ¶ added in v0.1.6
type ShortUrlReq struct { Url string `json:"url"` Header string `json:"header"` ER string `json:"e_r"` }
ShortUrlReq ShortUrl API 的 body json
type SongDetailReq ¶
type SongDetailReq struct { C string `json:"c"` ER string `json:"e_r"` Header string `json:"header"` }
SongDetailReq SongDetail API 的 body json
type SongLikeReq ¶ added in v0.1.11
type SongLikeReq struct { TrackId int `json:"trackId"` Like bool `json:"like"` ER string `json:"e_r"` Header string `json:"header"` }
SongLikeReq SongLike API 的 body json
type SongURLConfig ¶
type SongURLConfig struct { // EncodeType 编码类型, 可选 "mp3", "aac" EncodeType string // Level 音质等级, 可选 "lossless", "higher", "standard" Level string // Ids 歌曲 ID Ids []int }
SongURLConfig 获取歌曲 URL 的参数配置
type SongUrlReq ¶
type SongUrlReq struct { ER string `json:"e_r"` EncodeType string `json:"encodeType"` Header string `json:"header"` Ids string `json:"ids"` Level string `json:"level"` }
SongUrlReq SongURL API 的 body json
type UserPlaylistConfig ¶ added in v0.1.10
type UserPlaylistConfig struct { // UserID 用户 ID UserID int // Offset 偏移数量,用于分页 , 如 :( 页数 -1)*30, 其中 30 为 limit 的值 , 默认为 0 Offset int // Limit , 默认为 30 Limit int }
UserPlaylistConfig 获取用户歌单 API 的参数配置
type UserPlaylistReq ¶ added in v0.1.10
type UserPlaylistReq struct { Offset int `json:"offset"` Limit int `json:"limit"` Uid int `json:"uid"` ER string `json:"e_r"` Header string `json:"header"` }
UserPlaylistReq UserPlaylist API 的 body json
type UserSignReqJson ¶
type UserSignReqJson struct { // Type 签到类型 ,默认 0 ,其中0 为安卓端签到 ,1 为 web/PC 签到 Type int `json:"type"` }
UserSignReqJson 签到参数
Source Files
¶
- Batch.go
- Comment.go
- Search.go
- Upload.go
- albumDetail.go
- cloudbeanNum.go
- eventDelete.go
- eventSend.go
- loginStatus.go
- mlogSend.go
- msgSend.go
- musicianSign.go
- musicianTasks.go
- nosToken.go
- obtainCloudbean.go
- playlisTracks.go
- playlistDelete.go
- playlistDetail.go
- playlistGet.go
- playlistNew.go
- qrCheck.go
- qrUnikey.go
- recommendSongs.go
- shortURL.go
- songDetail.go
- songLike.go
- songURL.go
- userDetail.go
- userInfo.go
- userSetting.go
- userSign.go