From a67dbb9029c362f9ec5e0094c3f5885e157aecaa Mon Sep 17 00:00:00 2001 From: Alexander Epolite Date: Wed, 15 Jan 2025 16:28:46 -0700 Subject: [PATCH] update the README with recent information --- README.md | 41 +++++++---------------------------------- package.json | 2 +- 2 files changed, 8 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index c13fde2..2178ead 100644 --- a/README.md +++ b/README.md @@ -8,21 +8,6 @@ This is an API for the temporary email service [TempMail.lol](https://tempmail.lol). -## If you are using a BananaCrumbs ID/Token and have not migrated, install version 3.1.0 instead of 4.x.x! - -## Upgrading from 3.1.0 - -The key difference between 3.1.0 and 4.0.0 is the fact that the constructor only accepts an API Key, and not a BananaCrumbs ID. - -The custom domain method has changed as well as the createInbox method's parameters. - -## Upgrading from 2.0.3 - -The version 3.0.0+ is vastly different from the old version of the API. Please read the changes before using the new version of the API. - -Version 2.0.3 still works, but does not have support for custom domains or TempMail Plus. Note that v2 support may be dropped at any time, so please -upgrade your applications as soon as possible. - ## Installation ```bash npm i tempmail.lol @@ -117,33 +102,21 @@ const emails = tempmail.checkInbox("").then((emails) => { #### Note: you will need to be a TempMail Plus/Ultra subscriber to use custom domains! -#### Old Custom Domains (v1) -```js -tempmail.checkCustomDomainLegacy("example.com", "token").then(emails => { - emails.forEach(e => { - console.log("Email from: " + e.from + " to " + e.to); - }); -}); -``` - -You can obtain a token by visiting https://tempmail.lol/custom.html +To setup Custom Domains, visit your account on https://tempmail.lol/account and follow the instructions on https://tempmail.lol/custom -Custom domains will NOT alert you if the token is invalid. +After setting up Custom Domains, they can be checked the same way you make normal domains (note: only your account can access the domain!) -#### New Custom Domains (v2) ```js -tempmail.checkV2CustomDomain("example.com").then(emails => { - emails.forEach(e => { - console.log("Email from: " + e.from + " to " + e.to); - }); +tempmail.createInbox({ + community: false, + domain: "example.com", //replace with your custom domain + prefix: "optional", //this will be the ENTIRE beginning of the email. "optional" results in "optional@example.com". }); ``` -To setup this, visit your account on https://tempmail.lol/account and migrate if you have not already. - ### Webhooks -You can set up a webhook to be called when an email is received. +You can set up a webhook to be called when an email is received. You must have Custom Domains setup beforehand. ```js tempmail.setWebhook("https://example.com/webhook").then(() => { diff --git a/package.json b/package.json index cdcbf98..6ce8bdc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tempmail.lol", - "version": "4.3.1", + "version": "4.3.2", "description": "API to generate temporary email addresses.", "main": "dist/index.js", "types": "dist/index.d.ts",