feat(route): add spotify (#8966)

* feat: /spotify/playlist/:id

* feat: /spotify/artist

* feat(spotify/artist): add to radar

* feat: /spotify/saved

* feat: /spotify/top/{tracks,artists}

* feat(spotify): add images for artist and playlist

* docs: /spotify/*

* docs/en: /spotify configurations

* chore(spotify): apiKey/Secret -> clientId/Secret

* fix(spotify/utils): genres can be empty
This commit is contained in:
Outvi V
2022-02-04 18:46:53 +08:00
committed by GitHub
parent 8f33790045
commit 36b4cc5baa
14 changed files with 319 additions and 0 deletions
+10
View File
@@ -538,6 +538,16 @@ See docs of the specified route and `lib/config.js` for detailed information.
- `GITHUB_ACCESS_TOKEN`: GitHub Access Token
- spotify: [API key registration](https://developer.spotify.com)
- `SPOTIFY_CLIENT_ID`:Client ID of the application
- `SPOTIFY_CLIENT_SECRET`:Client secret of the application
- spotify (user data related routes):
- `SPOTIFY_REFRESHTOKEN`:The refresh token of the user f the Spotify application. Check [this gist](https://gist.github.com/outloudvi/d1bbeb5e989db5385384a223a7263744) for detailed information.
- Instagram:
- `IG_USERNAME`: Your Instagram username
+24
View File
@@ -150,6 +150,30 @@ Refer to [Pornhub F.A.Qs](https://help.pornhub.com/hc/en-us/articles/36004432703
<RouteEn author="fallenhh" example="/soundcloud/tracks/angeart" path="/soundcloud/tracks/:user" :paramsDesc="['User name']" />
## Spotify
### Artist Albums
<RouteEn author="outloudvi" example="/spotify/artist/6k9TBCxyr4bXwZ8Y21Kwn1" path="/spotify/artist/:id" :paramsDesc="['Artist ID']" />
### Playlist
<RouteEn author="outloudvi" example="/spotify/playlist/4UBVy1LttvodwivPUuwJk2" path="/spotify/playlist/:id" :paramsDesc="['Playlist ID']" />
### Personal Saved Tracks
<RouteEn author="outloudvi" example="/spotify/saved/50" path="/spotify/saved/:limit?" :paramsDesc="['Track count, 50 by default']" />
### Personal Top Tracks
<RouteEn author="outloudvi" example="/spotify/top/tracks" path="/spotify/top/tracks" />
### Personal Top Artists
<RouteEn author="outloudvi" example="/spotify/top/artists" path="/spotify/top/artists" />
## Trakt.tv
### User Collection
+10
View File
@@ -548,6 +548,16 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行
3. 点击 dynamic_new 请求,找到 Cookie
4. 视频和专栏只要求 `SESSDATA` 字段,动态需复制整段 Cookie
- spotify 全部路由: [注册地址](https://developer.spotify.com)
- `SPOTIFY_CLIENT_ID`:Spotify 应用的 client ID
- `SPOTIFY_CLIENT_SECRET`:Spotify 应用的 client secret
- spotify 用户相关路由
- `SPOTIFY_REFRESHTOKEN`:用户在此 Spotify 应用的 refresh token。可以利用 [此 gist](https://gist.github.com/outloudvi/d1bbeb5e989db5385384a223a7263744) 获取。
- 语雀 全部路由:[注册地址](https://www.yuque.com/register)
- `YUQUE_TOKEN`: 语雀 Token,[获取地址](https://www.yuque.com/settings/tokens)。语雀接口做了访问频率限制,为保证正常访问建议配置 Token,详见 [语雀开发者文档](https://www.yuque.com/yuque/developer/api#5b3a1535)。
+22
View File
@@ -826,6 +826,28 @@ JavDB 有多个备用域名,本路由以 <https://javdb7.com> 为默认域名
<Route author="fallenhh" example="/soundcloud/tracks/angeart" path="/soundcloud/tracks/:user" :paramsDesc="['用户名']" />
## Spotify
### 艺术家专辑
<Route author="outloudvi" example="/spotify/artist/6k9TBCxyr4bXwZ8Y21Kwn1" path="/spotify/artist/:id" :paramsDesc="['艺术家 ID']" />
### 播放列表
<Route author="outloudvi" example="/spotify/playlist/4UBVy1LttvodwivPUuwJk2" path="/spotify/playlist/:id" :paramsDesc="['播放列表 ID']" />
### 个人 Saved Tracks
<Route author="outloudvi" example="/spotify/saved/50" path="/spotify/saved/:limit?" :paramsDesc="['歌曲数量,默认为 50']" />
### 个人 Top Tracks
<Route author="outloudvi" example="/spotify/top/tracks" path="/spotify/top/tracks" />
### 个人 Top Artists
<Route author="outloudvi" example="/spotify/top/artists" path="/spotify/top/artists" />
## Sub HD
### 字幕