Skip to content

badsyntax/mailinabox-api-ts

Repository files navigation

mailinabox-api

Build & Publish

JavaScript/TypeScript client SDK for the Mail-in-a-Box API.

  • API version: 0.51.0
  • Package version: 0.51.1

https://www.npmjs.com/package/mailinabox-api

NOTE: This package is auto-generated from the Mail-In-A-Box OpenAPI spec.

Installing

npm install mailinabox-api --save

Usage

import {
  Configuration,
  ConfigurationParameters,
  MailUsersResponseFormat,
  MailApi
} from 'mailinabox-api';

const apiConfigParams: ConfigurationParameters = {
  basePath: '/admin',
  username: 'YOUR_USERNAME',
  password: 'YOUR_PASSWORD'
};

const apiConfig = new Configuration(apiConfigParams);
const mailApi = new MailApi(apiConfig);

// example request
const users = await mailApi.getMailUsers({
  format: MailUsersResponseFormat.Json,
});

License

MIT License

Copyright (c) 2020 Richard Willis