@allseated-registry/mailinator-client
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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.

Create index

Package Sidebar

Install

npm i @allseated-registry/mailinator-client

Weekly Downloads

112

Version

1.0.4

License

The Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)

Unpacked Size

52.2 kB

Total Files

128

Last publish

Collaborators

  • iraklii.d
  • moraru_diana
  • tfreifeld-allseated
  • tomyallseated
  • allseated-inc