Skip to content

Commit c724223

Browse files
committed
docs(engines/qq): add complete documents about configuration [skip ci]
1 parent fbbed77 commit c724223

2 files changed

Lines changed: 28 additions & 2 deletions

File tree

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,16 @@ N-API 和 RESTful API 支援的引擎(以下簡稱「預設引擎集」)與
9999
| 酷狗音乐 | `kugou` | ||
100100
| 酷我音乐 | `kuwo` | 目前僅支援 320kbps MP3 ||
101101
| 咪咕音乐 | `migu` | ||
102-
| JOOX | `joox` | 需要設定 `joox:cookie` ||
103-
| youtube-dl | `ytdl` | 預設使用的 `youtube-dl` 後端是 `yt-dlp`,可設定 `ytdl:exe` 調整 ||
102+
| JOOX | `joox` | 需要設定 `joox:cookie`,見引擎文件。 ||
103+
| YtDl | `ytdl` | 預設使用的 `youtube-dl` 後端是 `yt-dlp`,可設定 `ytdl:exe` 調整 ||
104104
| 第三方網易雲 API | `pyncm` | ||
105+
| QQ音乐 | `qq` | 需要設定 `qq:cookie`,見引擎文件。 ||
106+
107+
#### 引擎文件
108+
109+
- JOOX 引擎:<https://docs.rs/unm_engine_joox>
110+
- YtDl 引擎:<https://docs.rs/unm_engine_ytdl>
111+
- QQ 引擎:<https://docs.rs/unm_engine_qq>
105112

106113
### 設定全域通用設定(`Context`
107114

engines/qq/src/lib.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
//! UNM Engine: QQ
2+
//!
3+
//! You may need to login your QQ Music account in your browser,
4+
//! obtain its cookie and fill the cookie to the `qq:cookie` config.
5+
//!
6+
//! You can configure the cookie in the `ctx.config` field.
7+
//! You can build a `ctx.config` with [`unm_types::config::ConfigManagerBuilder`],
8+
//! for example:
9+
//!
10+
//! ```
11+
//! use unm_types::{ContextBuilder, config::ConfigManagerBuilder};
12+
//!
13+
//! let config = ConfigManagerBuilder::new()
14+
//! .set("qq:cookie", r#"uin=<your_uin>; qm_keyst=<your_qm_keyst>;"#)
15+
//! .build();
16+
//!
17+
//! let context = ContextBuilder::default()
18+
//! .config(config)
19+
//! .build();
20+
//! ```
221
322
pub mod api;
423

0 commit comments

Comments
 (0)