mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 22:51:23 +08:00
feat: 添加日推风格相关接口
This commit is contained in:
@@ -22,6 +22,7 @@ jobs:
|
|||||||
github.actor != 'yukka-agent[bot]' &&
|
github.actor != 'yukka-agent[bot]' &&
|
||||||
github.actor != 'github-actions[bot]'
|
github.actor != 'github-actions[bot]'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 15
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
@@ -56,6 +57,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
OPENCODE_API_KEY: ${{ steps.cfg.outputs.opencode_api_key }}
|
OPENCODE_API_KEY: ${{ steps.cfg.outputs.opencode_api_key }}
|
||||||
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
|
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
|
||||||
|
OPENCODE_PERMISSION: '{"permission":{"*":"allow","question":"deny"}}'
|
||||||
with:
|
with:
|
||||||
model: opencode/muse-spark-1.3-contributor-free
|
model: opencode/muse-spark-1.3-contributor-free
|
||||||
use_github_token: true
|
use_github_token: true
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
// 每日风格推荐场景配置列表获取
|
||||||
|
|
||||||
|
const createOption = require('../util/option.js')
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {}
|
||||||
|
return request(
|
||||||
|
`/api/homepage/daily/song/config/get`,
|
||||||
|
data,
|
||||||
|
createOption(query, 'xeapi'),
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
// 每日风格推荐场景配置设置
|
||||||
|
|
||||||
|
const createOption = require('../util/option.js')
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {
|
||||||
|
tags: JSON.stringify({
|
||||||
|
tagIds: String(query.tags).split(',').map(Number),
|
||||||
|
categoryId: Number(query.category),
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
console.log(data)
|
||||||
|
return request(
|
||||||
|
`/api/homepage/daily/song/tag/save`,
|
||||||
|
data,
|
||||||
|
createOption(query, 'xeapi'),
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
// 每日推荐风格歌曲
|
||||||
|
|
||||||
|
const createOption = require('../util/option.js')
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {}
|
||||||
|
return request(
|
||||||
|
`/api/homepage/category/daily/song/list`,
|
||||||
|
data,
|
||||||
|
createOption(query, 'xeapi'),
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
// 每日推荐歌曲 - v1
|
||||||
|
|
||||||
|
const createOption = require('../util/option.js')
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {
|
||||||
|
ispush: query.ispush || false,
|
||||||
|
}
|
||||||
|
return request(
|
||||||
|
`/api/v3/discovery/recommend/songs`,
|
||||||
|
data,
|
||||||
|
createOption(query, 'xeapi'),
|
||||||
|
)
|
||||||
|
}
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@neteasecloudmusicapienhanced/api",
|
"name": "@neteasecloudmusicapienhanced/api",
|
||||||
"version": "4.41.0",
|
"version": "4.41.1",
|
||||||
"description": "全网最全的网易云音乐API接口 || A revival project for NeteaseCloudMusicApi Node.js Services (Half Refactor & Enhanced)",
|
"description": "全网最全的网易云音乐API接口 || A revival project for NeteaseCloudMusicApi Node.js Services (Half Refactor & Enhanced)",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nodemon app.js",
|
"dev": "nodemon app.js",
|
||||||
|
|||||||
@@ -2391,6 +2391,16 @@ privilege:权限相关信息
|
|||||||
|
|
||||||
**调用例子 :** `/recommend/songs`
|
**调用例子 :** `/recommend/songs`
|
||||||
|
|
||||||
|
### 获取每日推荐歌曲 - v1
|
||||||
|
|
||||||
|
说明 : 调用此接口 , 可获得每日推荐歌曲 ( 需要登录 )
|
||||||
|
|
||||||
|
**可选参数 :** `ispush`: 是否刷新日推 , 默认为 false
|
||||||
|
|
||||||
|
**接口地址 :** `/recommend/songs/v1`
|
||||||
|
|
||||||
|
**调用例子 :** `/recommend/songs/v1`
|
||||||
|
|
||||||
### 每日推荐歌曲-不感兴趣
|
### 每日推荐歌曲-不感兴趣
|
||||||
|
|
||||||
说明 : 日推歌曲标记为不感兴趣( 同时会返回一个新推荐歌曲, 需要登录 )
|
说明 : 日推歌曲标记为不感兴趣( 同时会返回一个新推荐歌曲, 需要登录 )
|
||||||
@@ -5922,6 +5932,38 @@ let data = encodeURIComponent(
|
|||||||
|
|
||||||
**调用例子 :** `/fans/group/feed/recommend?fansGroupId=1872529203038486609&size=10&cursor=0`
|
**调用例子 :** `/fans/group/feed/recommend?fansGroupId=1872529203038486609&size=10&cursor=0`
|
||||||
|
|
||||||
|
## 每日指定风格歌曲推荐
|
||||||
|
|
||||||
|
说明 : 调用此接口 , 可获取每日指定风格歌曲推荐
|
||||||
|
|
||||||
|
**接口地址 :** `/recommend/category/songs`
|
||||||
|
|
||||||
|
**调用例子 :** `/recommend/category/songs`
|
||||||
|
|
||||||
|
## 获取每日指定风格歌曲推荐的风格列表
|
||||||
|
|
||||||
|
说明 : 调用此接口 , 可获取每日指定风格歌曲推荐的风格列表
|
||||||
|
|
||||||
|
**接口地址 :** `/recommend/category/configs`
|
||||||
|
|
||||||
|
**调用例子 :** `/recommend/category/configs`
|
||||||
|
|
||||||
|
## 设置每日指定风格歌曲推荐的风格
|
||||||
|
|
||||||
|
说明 : 调用此接口 , 可设置每日指定风格歌曲推荐的风格
|
||||||
|
|
||||||
|
**必选参数 :**
|
||||||
|
|
||||||
|
`tags`: 风格标签, 可通过 `/recommend/category/configs` 获取
|
||||||
|
|
||||||
|
`category`: 风格标签的父ID, 可通过 `/recommend/category/configs` 获取
|
||||||
|
|
||||||
|
!> 只能设置当前CategoryId下的tags, 不能设置其他CategoryId下的tags, 否则会报错
|
||||||
|
|
||||||
|
**接口地址 :** `/recommend/category/config`
|
||||||
|
|
||||||
|
**调用例子 :** `/recommend/category/config?tags=10004,10015&categoryId=1000`
|
||||||
|
|
||||||
## 离线访问此文档
|
## 离线访问此文档
|
||||||
|
|
||||||
此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
|
此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
|
||||||
|
|||||||
Reference in New Issue
Block a user