-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.ts
More file actions
32 lines (24 loc) · 948 Bytes
/
Copy pathtest.ts
File metadata and controls
32 lines (24 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import LanzouAPI from "./src/lanzou";
import "dotenv/config";
const cookie = process.env.LANZOU_COOKIE!;
const lanzou = new LanzouAPI(cookie);
LanzouAPI.queryShareFileLink("https://upload.lanzoue.com/iPjYI1fmhn1a").then(({ zt, info }) => {
console.log(info);
});
LanzouAPI.queryShareFileInfoWithPassword("https://upload.lanzoue.com/iPjYI1fmhn1a").then(({ zt, info }) => {
console.log(info);
});
LanzouAPI.queryShareFileLinkWithPassword("https://upload.lanzouj.com/i95j302pbxeb", "pass").then((resp) => {
console.log(resp);
});
LanzouAPI.queryShareFolderWithPassword("https://upload.lanzouj.com/b036v4cxa", "3260").then((resp) => {
console.log(resp);
});
lanzou.uploadFile(4999410, "test.zip").then(console.log);
lanzou.createFolder().then(({ zt, info, text }) => {
// 测试:创建并删除文件夹
console.log(zt, info, text);
if (zt) {
lanzou.deleteFolder(Number(text)).then(console.log);
}
});