@immail/web-api
Javascript library for using imMail Web API
Last updated 7 days ago by rmsouza .
MIT · Original npm · Tarball · package.json
$ cnpm install @immail/web-api 
SYNC missed versions from official npm registry.

imMail Web API

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

Installation

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

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

// Read a host, login and password from the environment variables
const host = process.env.IMMAIL_HOST
const login = process.env.IMMAIL_LOGIN
const password = process.env.IMMAIL_PASSWORD

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

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

Current Tags

  • 0.0.4                                ...           latest (7 days ago)

4 Versions

  • 0.0.4                                ...           7 days ago
  • 0.0.3                                ...           8 days ago
  • 0.0.2                                ...           8 days ago
  • 0.0.1                                ...           8 days ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 38
Last Day 0
Last Week 38
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2017 © taobao.org |