From 715e22b389135b42162dcd7146962782bb55f3fb Mon Sep 17 00:00:00 2001 From: binaryify Date: Wed, 18 Jan 2023 16:33:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E4=B8=80=E8=B5=B7=E5=90=AC?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=20#1677?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.MD | 3 + module/listentogether_end.js | 39 +++++++------ module/listentogether_heatbeat.js | 45 ++++++++------- module/listentogether_room_check.js | 39 +++++++------ module/listentogether_room_create.js | 39 +++++++------ module/listentogether_sync_list_command.js | 65 +++++++++++----------- module/listentogether_sync_playlist_get.js | 39 +++++++------ package.json | 2 +- 8 files changed, 134 insertions(+), 137 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 2742a04..50e4994 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,7 @@ # 更新日志 +### 4.8.9 | 2023.01.18 +- 补充一起听相关接口 #1677 + ### 4.8.8 | 2023.01.18 - 补充腾讯云serverless部署说明 diff --git a/module/listentogether_end.js b/module/listentogether_end.js index c4611b6..b5299ca 100644 --- a/module/listentogether_end.js +++ b/module/listentogether_end.js @@ -1,20 +1,19 @@ -// 一起听 结束房间 - -module.exports = (query, request) => { - const data = { - roomId: query.roomId - } - return request( - 'POST', - `http://interface.music.163.com/eapi/listen/together/end/v2`, - data, - { - crypto: 'eapi', - cookie: query.cookie, - proxy: query.proxy, - realIP: query.realIP, - url: '/api/listen/together/end/v2' - }, - ) - } - \ No newline at end of file +// 一起听 结束房间 + +module.exports = (query, request) => { + const data = { + roomId: query.roomId, + } + return request( + 'POST', + `http://interface.music.163.com/eapi/listen/together/end/v2`, + data, + { + crypto: 'eapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api/listen/together/end/v2', + }, + ) +} diff --git a/module/listentogether_heatbeat.js b/module/listentogether_heatbeat.js index 3e21da9..fc9dd65 100644 --- a/module/listentogether_heatbeat.js +++ b/module/listentogether_heatbeat.js @@ -1,23 +1,22 @@ -// 一起听 发送心跳 - -module.exports = (query, request) => { - const data = { - roomId: query.roomId, - songId: query.songId, - playStatus: query.playStatus, - progress: query.progress - } - return request( - 'POST', - `http://interface.music.163.com/eapi/listen/together/heartbeat`, - data, - { - crypto: 'eapi', - cookie: query.cookie, - proxy: query.proxy, - realIP: query.realIP, - url: '/api/listen/together/heartbeat' - }, - ) - } - \ No newline at end of file +// 一起听 发送心跳 + +module.exports = (query, request) => { + const data = { + roomId: query.roomId, + songId: query.songId, + playStatus: query.playStatus, + progress: query.progress, + } + return request( + 'POST', + `http://interface.music.163.com/eapi/listen/together/heartbeat`, + data, + { + crypto: 'eapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api/listen/together/heartbeat', + }, + ) +} diff --git a/module/listentogether_room_check.js b/module/listentogether_room_check.js index 4780529..2cec49b 100644 --- a/module/listentogether_room_check.js +++ b/module/listentogether_room_check.js @@ -1,20 +1,19 @@ -// 一起听 房间情况 - -module.exports = (query, request) => { - const data = { - roomId: query.roomId - } - return request( - 'POST', - `http://interface.music.163.com/eapi/listen/together/room/check`, - data, - { - crypto: 'eapi', - cookie: query.cookie, - proxy: query.proxy, - realIP: query.realIP, - url: '/api/listen/together/room/check' - }, - ) - } - \ No newline at end of file +// 一起听 房间情况 + +module.exports = (query, request) => { + const data = { + roomId: query.roomId, + } + return request( + 'POST', + `http://interface.music.163.com/eapi/listen/together/room/check`, + data, + { + crypto: 'eapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api/listen/together/room/check', + }, + ) +} diff --git a/module/listentogether_room_create.js b/module/listentogether_room_create.js index 7f25325..9af2a63 100644 --- a/module/listentogether_room_create.js +++ b/module/listentogether_room_create.js @@ -1,20 +1,19 @@ -// 一起听创建房间 - -module.exports = (query, request) => { - const data = { - refer: 'songplay_more' - } - return request( - 'POST', - `http://interface.music.163.com/eapi/listen/together/room/create`, - data, - { - crypto: 'eapi', - cookie: query.cookie, - proxy: query.proxy, - realIP: query.realIP, - url: '/api/listen/together/room/create' - }, - ) - } - \ No newline at end of file +// 一起听创建房间 + +module.exports = (query, request) => { + const data = { + refer: 'songplay_more', + } + return request( + 'POST', + `http://interface.music.163.com/eapi/listen/together/room/create`, + data, + { + crypto: 'eapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api/listen/together/room/create', + }, + ) +} diff --git a/module/listentogether_sync_list_command.js b/module/listentogether_sync_list_command.js index e2d9bb6..11de18c 100644 --- a/module/listentogether_sync_list_command.js +++ b/module/listentogether_sync_list_command.js @@ -1,33 +1,32 @@ -// 一起听 更新播放列表 - -module.exports = (query, request) => { - const data = { - roomId: query.roomId, - playlistParam: JSON.stringify({ - commandType: query.commandType, - version: [ - { - userId: query.userId, - version: query.version - } - ], - anchorSongId: '', - anchorPosition: -1, - randomList: query.randomList.split(','), - displayList: query.displayList.split(',') - }) - } - return request( - 'POST', - `http://interface.music.163.com/eapi/listen/together/sync/list/command/report`, - data, - { - crypto: 'eapi', - cookie: query.cookie, - proxy: query.proxy, - realIP: query.realIP, - url: '/api/listen/together/sync/list/command/report' - }, - ) - } - \ No newline at end of file +// 一起听 更新播放列表 + +module.exports = (query, request) => { + const data = { + roomId: query.roomId, + playlistParam: JSON.stringify({ + commandType: query.commandType, + version: [ + { + userId: query.userId, + version: query.version, + }, + ], + anchorSongId: '', + anchorPosition: -1, + randomList: query.randomList.split(','), + displayList: query.displayList.split(','), + }), + } + return request( + 'POST', + `http://interface.music.163.com/eapi/listen/together/sync/list/command/report`, + data, + { + crypto: 'eapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api/listen/together/sync/list/command/report', + }, + ) +} diff --git a/module/listentogether_sync_playlist_get.js b/module/listentogether_sync_playlist_get.js index 1485910..57fa86b 100644 --- a/module/listentogether_sync_playlist_get.js +++ b/module/listentogether_sync_playlist_get.js @@ -1,20 +1,19 @@ -// 一起听 当前列表获取 - -module.exports = (query, request) => { - const data = { - roomId: query.roomId - } - return request( - 'POST', - `http://interface.music.163.com/eapi/listen/together/sync/playlist/get`, - data, - { - crypto: 'eapi', - cookie: query.cookie, - proxy: query.proxy, - realIP: query.realIP, - url: '/api/listen/together/sync/playlist/get' - }, - ) - } - \ No newline at end of file +// 一起听 当前列表获取 + +module.exports = (query, request) => { + const data = { + roomId: query.roomId, + } + return request( + 'POST', + `http://interface.music.163.com/eapi/listen/together/sync/playlist/get`, + data, + { + crypto: 'eapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api/listen/together/sync/playlist/get', + }, + ) +} diff --git a/package.json b/package.json index 0d14c73..9440868 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "4.8.8", + "version": "4.8.9", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js",