forked from zhx47/pikpak_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
35 lines (31 loc) · 1.07 KB
/
main.js
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
33
34
35
const {PikPak} = require("./pikpak");
const randomstring = require('randomstring')
async function main() {
const name = randomstring.generate({
length: 8,
charset: 'alphabetic'
});
const password = randomstring.generate({
length: 10,
charset: 'alphanumeric'
});
// 注册
let pikPak = new PikPak(`${name}@temp.com`, password, null, '自己的邀请码');
pikPak.authVerification()
.then(() => pikPak.getVerificationCode())
.then(() => pikPak.authVerificationVerify())
.then(() => pikPak.authSignup())
.then(() => pikPak.userMe())
.then(() => pikPak.activityInvite())
.then(() => pikPak.activityInviteCode())
.then(() => pikPak.activationCode())
.then(() => pikPak.printUserInfo())
.catch(e => console.log(e))
// 登录
// let pikPak = new PikPak('[email protected]', 'tempPassword', 'tempuuid');
// pikPak.signin()
// .then(() => pikPak.userMe())
// .then(() => pikPak.printUserInfo())
// .catch(e => console.log(e))
}
main()