feat: integrate api in electron app

This commit is contained in:
kunkka 2020-10-27 23:08:38 +08:00
parent bd29570e31
commit 74bf714c28
240 changed files with 21003 additions and 112 deletions

19
napi/module/batch.js Normal file
View file

@ -0,0 +1,19 @@
// 批量请求接口
module.exports = (query, request) => {
const data = {
e_r: true,
};
Object.keys(query).forEach((i) => {
if (/^\/api\//.test(i)) {
data[i] = query[i];
}
});
return request('POST', `https://music.163.com/eapi/batch`, data, {
crypto: 'eapi',
proxy: query.proxy,
url: '/api/batch',
cookie: query.cookie,
realIP: query.realIP,
});
};