# @immail/web-api

> Javascript library for using imMail Web API

Latest version **0.0.11** (published 2020-06-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @immail/web-api
pnpm add @immail/web-api
yarn add @immail/web-api
bun add @immail/web-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.11 |
| Published | 2020-06-26 |
| First published | 2020-05-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 16.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | imMail Team |
| Maintainers | rmsouza |
| Keywords | api, javascript, immail |

## Links

- npm: https://www.npmjs.com/package/@immail/web-api
- npm.io page: https://npm.io/package/@immail/web-api

## Dependencies (2)

- [request](https://npm.io/package/request.md) ^2.88.2
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.5

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.0.11 (latest) — 2020-06-26
- 0.0.10 — 2020-06-26
- 0.0.9 — 2020-06-26
- 0.0.8 — 2020-06-25
- 0.0.7 — 2020-06-06
- 0.0.6 — 2020-06-02
- 0.0.5 — 2020-06-02
- 0.0.4 — 2020-05-20
- 0.0.3 — 2020-05-20
- 0.0.2 — 2020-05-20
- 0.0.1 — 2020-05-20

## README

# imMail Web API

The `@immail/web-api` lib contains an easy and customizable HTTP client for using [Web API](https://api.immail.ca) or on-premise versions.
Use it in your app to call any of the endpoints.

## Installation

```shell
$ npm install @immail/web-api
```

## Usage

These example shows one of the most common features of the `WebClient`.

---

### Initialize the client

The package exports a `WebClient` class. All you need to do is instantiate it, and you're ready to go. You'll typically
initialize it with a `{ host }`. If you do not provide a host, the default one (https://api.immail.ca) will be defined.

```javascript
const { WebClient } = require('@immail/web-api');

// Read a host, login and password from the environment variables
const host = process.env.IMMAIL_API_HOST // Optional. Usefull for on-premise versions. The imMail's production host will be set as default
const login = process.env.IMMAIL_LOGIN
const password = process.env.IMMAIL_PASSWORD

// Initialize
const webImmail = new WebClient({ host })

// Login
await webImmail.login({ login, password })
```

---
_Source: https://npm.io/package/@immail/web-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
