-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
49 lines (37 loc) · 1.02 KB
/
test.js
File metadata and controls
49 lines (37 loc) · 1.02 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import MiabClient from "./index.js";
const testDomain = '';
const testUrl = 'https://' + testDomain;
const testApiEmail = '';
const testApiPassword = '';
const testEmail = '';
const testPassword = '';
const client = new MiabClient(testUrl, testApiEmail, testApiPassword);
async function main() {
const mailbox = await client.createMailbox('ticktack.tips');
console.log(mailbox);
}
async function readEmails() {
const emails = await client.getEmails(testEmail, testPassword);
console.log(emails.response[0]);
}
async function getSpecficMail() {
const email = await client.waitForEmail({
email: testEmail,
password: testPassword,
regex: ['confirm']
})
console.log(email);
}
async function getMailboxes() {
const mailboxes = await client.getMailboxes();
console.log(mailboxes);
}
async function getWebDomains() {
const domains = await client.getWebDomains();
console.log(domains);
}
// main();
// readEmails();
// getSpecficMail();
// getMailboxes();
// getWebDomains();