mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-18 06:07:48 +00:00
feat: updates
This commit is contained in:
parent
cf7a4528dd
commit
0e58bb6e80
44 changed files with 1027 additions and 496 deletions
|
|
@ -62,6 +62,47 @@ export function fetchUserLikedTracksIDs(
|
|||
})
|
||||
}
|
||||
|
||||
// 听歌打卡
|
||||
export function scrobble(params: {
|
||||
id: number // track id
|
||||
sourceid: number // 歌单或专辑id
|
||||
time?: number // 已听秒数
|
||||
}): Promise<null> {
|
||||
return request({
|
||||
url: '/scrobble',
|
||||
method: 'post',
|
||||
params: {
|
||||
...params,
|
||||
timestamp: new Date().getTime(),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export interface FetchListenedRecordsParams {
|
||||
uid: number // 用户id
|
||||
type: number // type=1 时只返回 weekData, type=0 时返回 allData
|
||||
}
|
||||
export interface FetchListenedRecordsResponse {
|
||||
code: number
|
||||
weekData: {
|
||||
playCount: number
|
||||
score: number
|
||||
song: Track
|
||||
}[]
|
||||
}
|
||||
export function fetchListenedRecords(
|
||||
params: FetchListenedRecordsParams
|
||||
): Promise<FetchListenedRecordsResponse> {
|
||||
return request({
|
||||
url: '/user/record',
|
||||
method: 'get',
|
||||
params: {
|
||||
...params,
|
||||
timestamp: new Date().getTime(),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 每日签到
|
||||
* 说明 : 调用此接口可签到获取积分
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue