mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
增加私信专辑功能
This commit is contained in:
parent
1eb178d0e4
commit
cd17ccfbaa
@ -2907,7 +2907,7 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`
|
|||||||
|
|
||||||
**调用例子 :** `/send/text?user_ids=32953014&msg=test`,`/send/text?user_ids=32953014,475625142&msg=test`
|
**调用例子 :** `/send/text?user_ids=32953014&msg=test`,`/send/text?user_ids=32953014,475625142&msg=test`
|
||||||
|
|
||||||
### 发送私信音乐
|
### 发送私信(带歌曲)
|
||||||
|
|
||||||
说明 : 登录后调用此接口 , 传入用户 id 和要发送的信息,音乐id, 可以发送音乐私信,返回内容为历史私信
|
说明 : 登录后调用此接口 , 传入用户 id 和要发送的信息,音乐id, 可以发送音乐私信,返回内容为历史私信
|
||||||
|
|
||||||
@ -2915,12 +2915,29 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`
|
|||||||
|
|
||||||
`user_ids` : 用户 id,多个需用逗号隔开
|
`user_ids` : 用户 id,多个需用逗号隔开
|
||||||
|
|
||||||
|
`id` : 要发送音乐的id
|
||||||
|
|
||||||
`msg` : 要发送的信息
|
`msg` : 要发送的信息
|
||||||
|
|
||||||
**接口地址 :** `/send/song`
|
**接口地址 :** `/send/song`
|
||||||
|
|
||||||
**调用例子 :** `/send/song?user_ids=1&id=351318&msg=测试`
|
**调用例子 :** `/send/song?user_ids=1&id=351318&msg=测试`
|
||||||
|
|
||||||
|
### 发送私信(带专辑)
|
||||||
|
|
||||||
|
说明 : 登录后调用此接口 , 传入用户 id 和要发送的信息,专辑id, 可以发送专辑私信,返回内容为消息id
|
||||||
|
|
||||||
|
**必选参数 :**
|
||||||
|
|
||||||
|
`user_ids` : 用户 id,多个需用逗号隔开
|
||||||
|
|
||||||
|
`id` : 要发送专辑的id
|
||||||
|
|
||||||
|
`msg` : 要发送的信息
|
||||||
|
|
||||||
|
**接口地址 :** `/send/album`
|
||||||
|
|
||||||
|
**调用例子 :** `/send/album?user_ids=1&id=351318&msg=测试`
|
||||||
|
|
||||||
### 发送私信(带歌单)
|
### 发送私信(带歌单)
|
||||||
|
|
||||||
|
18
module/send_album.js
Normal file
18
module/send_album.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// 私信专辑
|
||||||
|
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
query.cookie.os = 'ios'
|
||||||
|
query.cookie.appver = '8.1.20'
|
||||||
|
const data = {
|
||||||
|
id: query.id,
|
||||||
|
msg: query.msg || '',
|
||||||
|
type: 'album',
|
||||||
|
userIds: '[' + query.user_ids + ']',
|
||||||
|
}
|
||||||
|
return request('POST', `https://music.163.com/api/msg/private/send`, data, {
|
||||||
|
crypto: 'api',
|
||||||
|
cookie: query.cookie,
|
||||||
|
proxy: query.proxy,
|
||||||
|
realIP: query.realIP,
|
||||||
|
})
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user