Socket
Socket
Sign inDemoInstall

mailinator-client

Package Overview
Dependencies
63
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mailinator-client

Mailinator REST API client for JavaScript applications.


Version published
Weekly downloads
17K
decreased by-11.77%
Maintainers
2
Created
Weekly downloads
 

Readme

Source
Mailinator REST API client for JavaScript applications.

Uses Microsoft's typed-rest-client. All requests are async functions.

Usage example
Create MailinatorClient
const mailinatorClient: MailinatorClient = new MailinatorClient("yourApiKeyHere");
Get inbox from domain
const response: IRestResponse<Inbox> = await mailinatorClient.request(
            new GetInboxRequest("yourDomainNameHere")
        );
Get paginated messages from domain and inbox
const response: IRestResponse<Inbox> = await mailinatorClient.request(
            new GetInboxRequest("yourDomainNameHere", "yourInboxNameHere", 10, 20, Sort.DESC, true)
        );
Get message
const response: IRestResponse<Message> = await mailinatorClient.request(
            new GetMessageRequest("yourDomainNameHere", "yourInboxNameHere", "yourMessageIdHere")
        );
Build tests
  • npm test

By default, most of the tests are skipped.

Build with tests

Most of the tests require env variables with valid values. Visit tests source code and review EnabledIfEnvironmentVariable wrapped parts. The more env variables you set, the more tests are run.

  • MAILINATOR_TEST_API_TOKEN - API tokens for authentication; basic requirement across many tests;see also https://manybrain.github.io/m8rdocs/#api-authentication
  • MAILINATOR_TEST_DOMAIN_PRIVATE - private domain; visit https://www.mailinator.com/
  • MAILINATOR_TEST_INBOX - some already existing inbox within the private domain
  • MAILINATOR_TEST_PHONE_NUMBER - associated phone number within the private domain; see also https://manybrain.github.io/m8rdocs/#fetch-an-sms-messages
  • MAILINATOR_TEST_MESSAGE_WITH_ATTACHMENT_ID - existing message id within inbox (see above) within private domain (see above); see also https://manybrain.github.io/m8rdocs/#fetch-message
  • MAILINATOR_TEST_ATTACHMENT_ID - existing message id within inbox (see above) within private domain (see above); see also https://manybrain.github.io/m8rdocs/#fetch-message
  • MAILINATOR_TEST_DELETE_DOMAIN - don't use it unless you are 100% sure what you are doing
  • MAILINATOR_TEST_WEBHOOKTOKEN_PRIVATEDOMAIN - private domain for webhook token
  • MAILINATOR_TEST_WEBHOOKTOKEN_CUSTOMSERVICE - custom service for webhook token
  • MAILINATOR_TEST_AUTH_SECRET - authenticator secret
  • MAILINATOR_TEST_AUTH_ID - authenticator id
  • MAILINATOR_TEST_WEBHOOK_INBOX - inbox for webhook
  • MAILINATOR_TEST_WEBHOOK_CUSTOMSERVICE - custom service for webhook
Create index

Keywords

FAQs

Last updated on 23 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc