Skip to content

Commit

Permalink
docs: add OneSecMail example
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinRouchut committed Mar 30, 2023
1 parent 87538ce commit 97813f5
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,26 @@ Once the package is installed, you can import the library using `import`:
import { OneSecMail, OneSecMailAPI } from "onesecmail";
```

# Example
# Examples

## OneSecMail

```ts
import { OneSecMail } from "onesecmail";

const mailbox = await OneSecMail("[email protected]");

const messages = await mailbox.getMessages();

for (const message of messages) {
const fullMessage = await message.fetchFullMessage();
console.log(fullMessage.serialize());
}

await mailbox.clearMessages();
```

## OneSecMailAPI

```ts
import { OneSecMailAPI } from "onesecmail";
Expand Down

0 comments on commit 97813f5

Please sign in to comment.