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
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