api

package
v0.1.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2022 License: GPL-3.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

View Source
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"
)
View Source
const AddCommentAPI = "/api/v1/resource/comments/add"

AddCommentAPI 新增评论 API

View Source
const AlbumDetailAPI = "/api/album/v3/detail"

AlbumDetailAPI 获取专辑详细 API

View Source
const CloudbeanNumAPI = "/api/cloudbean/get"

CloudbeanNumAPI 获取音乐人云豆数量 API

View Source
const DelCommentAPI = "/api/resource/comments/delete"

DelCommentAPI 删除评论 API

View Source
const DelEventAPI = "/api/event/delete"

DelEventAPI 删除动态 API

View Source
const DelPlayListAPI = "/api/playlist/delete"

DelPlayListAPI 删除歌单 API

View Source
const GetCommentAPI = "/api/v2/resource/comments"

GetCommentAPI 获取评论 API

View Source
const LoginStatusAPI = "/api/w/nuser/account/get"

LoginStatusAPI 获取账号登录状态 API

View Source
const MusicianSignAPI = "/api/creator/user/access"

MusicianSignAPI 音乐人签到 API

View Source
const MusicianTasksAPI = "/api/nmusician/workbench/mission/cycle/list"

MusicianTasksAPI 获取音乐人任务列表 API

View Source
const NewPlayListAPI = "/api/playlist/create"

NewPlayListAPI 新建歌单 API

View Source
const NosTokenAPI = "/api/nos/token/alloc"

NosTokenAPI 获取 NosToken API (用于文件上传)

View Source
const ObtainCloudbeanAPI = "/api/nmusician/workbench/mission/reward/obtain/new"

ObtainCloudbeanAPI 领取云豆 API

View Source
const PlaylistDetailAPI = "/api/v6/playlist/detail"

PlaylistDetailAPI 歌单详细信息 API

View Source
const PlaylistTracksAPI = "/api/playlist/manipulate/tracks"

PlaylistTracksAPI 管理歌单歌曲 API

View Source
const QrLoginAPI = "/api/login/qrcode/client/login"

QrLoginAPI 检查 QR 登录状态 API

View Source
const QrUnikeyAPI = "/api/login/qrcode/unikey"

QrUnikeyAPI 获取 QR 登录的 unikey

View Source
const RecommendSongsAPI = "/api/v3/discovery/recommend/songs"

RecommendSongsAPI 获取日推歌曲 API

View Source
const ReplyCommentAPI = "/api/v1/resource/comments/reply"

ReplyCommentAPI 回复评论 API

View Source
const SearchComplexAPI = "/api/search/complex/get/v2"

SearchComplexAPI 复杂搜索 API

View Source
const SearchMultiAPI = "/api/search/suggest/multimatch"

SearchMultiAPI 搜索多重匹配 API

View Source
const SearchSongAPI = "/api/v1/search/song/get"

SearchSongAPI 歌曲搜索 API

View Source
const SearchSuggestAPI = "/api/search/suggest/keyword"

SearchSuggestAPI 获取搜索建议 API

View Source
const SendEventAPI = "/api/share/friends/resource"

SendEventAPI 发送动态 API

View Source
const SendMlogAPI = "/api/mlog/publish/v1"

SendMlogAPI 发送 Mlog API

View Source
const SendMsgAPI = "/api/msg/private/send"

SendMsgAPI 发送私信 API

View Source
const ShortUrlAPI = "/api/middle/shorturl/generate"

ShortUrlAPI 短链接 API

View Source
const SongDetailAPI = "/api/v3/song/detail"

SongDetailAPI 歌曲详细信息 API

View Source
const SongDownloadURL = "/api/song/enhance/download/url"

SongDownloadURL 歌曲下载 URL API

View Source
const SongLikeAPI = "/api/song/like"

SongLikeAPI 添加/删除红心歌曲 API

View Source
const SongLyricAPI = "/api/song/lyric"

SongLyricAPI 获取歌词 API

View Source
const SongUrlAPI = "/api/song/enhance/player/url/v1"

SongUrlAPI 歌曲 URl API

View Source
const UploadEventImgAPI = "/api/upload/event/img/v1"

UploadEventImgAPI 获取用于发送动态的图片信息

View Source
const UserDetailAPI = "/api/v1/user/detail"

UserDetailAPI 用户详细信息 API

View Source
const UserInfoAPI = "/api/v1/user/info"

UserInfoAPI 用户信息 API

View Source
const UserPlaylistAPI = "/api/user/playlist"

UserPlaylistAPI 获取用户歌单 API

View Source
const UserSettingAPI = "/api/user/setting"

UserSettingAPI 用户设置 API

View Source
const UserSignAPI = "/api/point/dailyTask"

UserSignAPI 用户签到 API

View Source
const UserStatusDetailAPI = "/api/social/user/status/detail"

UserStatusDetailAPI 获取用户状态详情

View Source
const UserStatusEditAPI = "/api/social/user/status/edit"

UserStatusEditAPI 编辑用户状态

View Source
const VipGrowrthpointAPI = "/api/vipnewcenter/app/level/growhpoint/basic"

VipGrowrthpointAPI VIP 成长值信息 API

View Source
const VipInfoAPI = "/api/music-vip-membership/client/vip/info"

VipInfoAPI 获取 VPI 详细信息 API

View Source
const VipTaskRewardAPI = "/api/vipnewcenter/app/level/task/reward/get"

VipTaskRewardAPI 领取任务成长值奖励 API

View Source
const VipTaskRewardAllAPI = "/api/vipnewcenter/app/level/task/reward/getall"

VipTaskRewardAllAPI 领取所有任务成长值奖励 API

View Source
const VipTasksListAPI = "/api/vipnewcenter/app/level/task/list"

VipTasksListAPI 获取 VIP 任务列表 API

Variables

View Source
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

func CreateAlbumDetailReqJson(albumID int) string

CreateAlbumDetailReqJson 创建请求 body json

func CreateCheckQrLoginJson added in v0.1.10

func CreateCheckQrLoginJson(key string) string

CreateCheckQrLoginJson 创建请求 body json

func CreateCommentJson

func CreateCommentJson(config CommentConfig) string

CreateCommentJson 创建请求 body json

func CreateDelEventReqJson

func CreateDelEventReqJson(eventID int) string

CreateDelEventReqJson 创建请求 body json

func CreateDelPlaylistReqJson added in v0.1.10

func CreateDelPlaylistReqJson(playlistID int) string

CreateDelPlaylistReqJson 创建请求 body json

func CreateEventImgReqJson

func CreateEventImgReqJson(imgID, imgSubtype string) string

CreateEventImgReqJson 创建请求 body json

func CreateEventPicsJson

func CreateEventPicsJson(picData []types.UploadEventImgData) string

CreateEventPicsJson 创建动态图片数据 json

func CreateEventReqJson

func CreateEventReqJson(text, pics string) string

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

func CreateMlogNosTokenReqJson(filePath string) (string, []byte, error)

CreateMlogNosTokenReqJson 创建请求 body json

func CreateNewPlaylistReqJson added in v0.1.10

func CreateNewPlaylistReqJson(name string, privacy int) string

CreateNewPlaylistReqJson 创建请求 body json

func CreateNosTokenReqJson

func CreateNosTokenReqJson(filePath string) (string, []byte, error)

CreateNosTokenReqJson 创建请求 body json

func CreateObtainCloudbeanReqJson

func CreateObtainCloudbeanReqJson(userMissionID, period int) string

CreateObtainCloudbeanReqJson 创建请求 json

func CreatePicMlogReqJson

func CreatePicMlogReqJson(text string, songInfo types.SongDetailData, picData []MlogPic) string

CreatePicMlogReqJson 创建请求 body json

func CreatePicMsgReqJson

func CreatePicMsgReqJson(userIDs []int, picData types.NosTokenData, picFile []byte) (string, error)

CreatePicMsgReqJson 创建请求 body json

func CreatePlayListTracksReqJson added in v0.1.11

func CreatePlayListTracksReqJson(musicIds []int, playlistID, operation int) string

CreatePlayListTracksReqJson 创建请求 body json, operation: 1为添加, 0或其他值为删除

func CreatePlaylistDetailReqJson added in v0.1.5

func CreatePlaylistDetailReqJson(id int) string

CreatePlaylistDetailReqJson 创建请求 body json

func CreateSearchComplexReqJson added in v0.1.11

func CreateSearchComplexReqJson(keyword string) string

CreateSearchComplexReqJson 创建请求 body json

func CreateSearchMultiReqJson added in v0.1.11

func CreateSearchMultiReqJson(keyword string) string

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

func CreateSearchSuggestReqJson(keyword string) string

CreateSearchSuggestReqJson 创建请求 body json

func CreateShortUrlJson added in v0.1.6

func CreateShortUrlJson(url string) string

CreateShortUrlJson 创建请求 body json

func CreateSongDetailReqJson

func CreateSongDetailReqJson(ids []int) string

CreateSongDetailReqJson 创建请求 body json

func CreateSongDownloadURLJson added in v0.1.17

func CreateSongDownloadURLJson(id int) string

CreateSongDownloadURLJson 创建请求 body json

func CreateSongLikeReqJson added in v0.1.11

func CreateSongLikeReqJson(musicID int, isLike bool) string

CreateSongLikeReqJson 创建请求 body json

func CreateSongLyricReqJson added in v0.1.17

func CreateSongLyricReqJson(id int) string

CreateSongLyricReqJson 创建请求 body json

func CreateSongURLJson

func CreateSongURLJson(config SongURLConfig) string

CreateSongURLJson 创建请求 body json

func CreateTextMsgReqJson

func CreateTextMsgReqJson(userIDs []int, msg string) string

CreateTextMsgReqJson 创建请求 body json

func CreateUserPlaylistReqJson added in v0.1.10

func CreateUserPlaylistReqJson(config UserPlaylistConfig) string

CreateUserPlaylistReqJson 创建请求 body json

func CreateUserSignReqJson

func CreateUserSignReqJson(signType int) string

CreateUserSignReqJson 创建请求 json

func CreateUserStatusDetailReqJson added in v0.1.18

func CreateUserStatusDetailReqJson(visitorId int) string

CreateUserStatusDetailReqJson 创建请求 json

func CreateUserStatusEditReqJson added in v0.1.18

func CreateUserStatusEditReqJson(context string) string

CreateUserStatusEditReqJson 创建请求 json

func CreateVipTaskRewardReqJson added in v0.1.17

func CreateVipTaskRewardReqJson(taskID string) string

CreateVipTaskRewardReqJson 创建请求 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 GetSongDownloadURL added in v0.1.17

func GetSongDownloadURL(data utils.RequestData, id int) (result types.SongDownloadURLData, err error)

GetSongDownloadURL 获取歌曲下载 URL, 非 VIP 账号可通过此 API 获取部分歌曲的无损音质

func GetSongLyric added in v0.1.17

func GetSongLyric(data utils.RequestData, id int) (result types.SongLyricData, err error)

GetSongLyric 获取歌曲歌词

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 GetUserStatus added in v0.1.18

func GetUserStatus(data utils.RequestData, userID int) (result types.UserStatusDetailData, err error)

GetUserStatus 获取用户状态

func GetVipGrowrthpoint added in v0.1.17

func GetVipGrowrthpoint(data utils.RequestData) (result types.VipGrowthpointData, err error)

GetVipGrowrthpoint 获取当前账号 VIP 成长值信息

func GetVipInfo added in v0.1.17

func GetVipInfo(data utils.RequestData) (result types.VipInfoData, err error)

GetVipInfo 获取当前账号 VIP 信息

func GetVipTasksList added in v0.1.17

func GetVipTasksList(data utils.RequestData) (result types.VipTaskslistDetailData, err error)

GetVipTasksList 获取 VIP 任务列表

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 SetUserStatus added in v0.1.18

func SetUserStatus(data utils.RequestData, ctx string) (result types.UserStatusDetailData, err error)

SetUserStatus 设置用户状态

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 签到

func VipTaskReward added in v0.1.17

func VipTaskReward(data utils.RequestData, taskID string) (result types.VipTaskRewardData, err error)

VipTaskReward 领取任务成长值奖励

func VipTaskRewardAll added in v0.1.17

func VipTaskRewardAll(data utils.RequestData) (result types.VipTaskRewardData, err error)

VipTaskRewardAll 领取所有任务成长值奖励

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 Batch

type Batch struct {
	API    map[string]interface{}
	Result string
	Header http.Header
	Error  error
}

Batch 批处理 APi

func NewBatch added in v0.1.10

func NewBatch(apis ...BatchAPI) *Batch

NewBatch 新建 Batch 对象

func (*Batch) Add

func (b *Batch) Add(apis ...BatchAPI) *Batch

Add 添加 API

func (*Batch) Do

func (b *Batch) Do(data utils.RequestData) *Batch

Do 请求批处理 API

func (*Batch) Parse added in v0.1.14

func (b *Batch) Parse() (*Batch, map[string]string)

Parse 解析 Batch 的 Json 数据

type BatchAPI

type BatchAPI struct {
	Key  string
	Json string
}

BatchAPI 被批处理的 API

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 SongDownloadURLReq added in v0.1.17

type SongDownloadURLReq struct {
	// Br 码率,默认设置了 999000 即最大码率
	Id int `json:"id"`
	// Ids 歌曲 ID
	Br int `json:"br"`
}

SongDownloadURLReq 歌曲下载 URL 的参数配置

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 SongLyricReq added in v0.1.17

type SongLyricReq struct {
	Id int `json:"id"`
	Lv int `json:"lv"`
	Kv int `json:"kv"`
	Tv int `json:"tv"`
}

SongLyricReq SongLyric 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 签到参数

type UserStatusDetailReqJson added in v0.1.18

type UserStatusDetailReqJson struct {
	VisitorId int `json:"visitorId"`
}

UserStatusDetailReqJson 获取用户状态详情参数

type UserStatusEditReqJson added in v0.1.18

type UserStatusEditReqJson struct {
	Content string `json:"content"`
}

UserStatusEditReqJson 编辑用户状态参数

type VipTaskRewardReqJson added in v0.1.17

type VipTaskRewardReqJson struct {
	TaskIds string `json:"taskIds"`
}

VipTaskRewardReqJson 领取任务成长值请求参数

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL