Socket
Book a DemoInstallSign in
Socket

jmap-draft-client

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jmap-draft-client

This lib help to make requests against a JMAP server

0.1.5
latest
Source
npmnpm
Version published
Weekly downloads
9
Maintainers
1
Weekly downloads
 
Created
Source

JMAP-DRAFT-CLIENT

Join the chat at https://gitter.im/linagora/jmap-client Build Status Coverage Status

This repository provides a JavaScript library to make requests against a JMAP server. It is a client-side implementation of the JMAP specification. It is developed using ES6 and transpiled to ES5 code using babel.js.

Non-exhaustive list of features:

  • Entities are modeled as JavaScript classes.
  • Expose a Client class that you can use to send JMAP requests, using a fluent API.
  • Uses Promises exclusively, and allows for pluggable Promise implementation.
  • Allows for pluggable transports, with default support for node.js request and jQuery in the browser.

Usage

Installation

The library is provided as a NPM or Bower packages, thus to install either use:

npm install jmap-draft-client

or

bower install jmap-draft-client

depending on your preferred package manager.

Code

The library is very easy to use, all you need to do is create an instance of the Client class, then use its fluent API to send some JMAP requests:

new jmapDraft.Client(<your Transport>, <your PromiseProvider>)
    .withAPIUrl('https://jmap.my.server.com')
    .withAuthenticationToken('YourAuthenticationToken')
    .getMailboxes()
    .then((mailboxes) => {
        // Do something with the list of mailboxes
    }, (err) => {
        // An error occured
    });

Once you're familiar with the library, head on to the API documentation to find out what's possible...
There's also some code samples included in the samples folder.

How to contribute

1. Clone the repository

git clone https://ci.open-paas.org/stash/scm/olibs/jmap-draft-client.git
cd jmap-draft-client

2. Install dependencies

npm install

3. Compile the library and run the tests

grunt

4. Code, execute tests then pull request !

More detailled instructions can be found in the contributing section.

Release

If you are a maintainer of this project, to release a new version check this project https://ci.linagora.com/linagora/lgs/openpaas/openpaas-release-module

Roadmap

  • Implement complete error handling.
  • Add support for message attachments.
  • Support entities states, and then getXXXUpdates requests.
  • ...

License

MIT

FAQs

Package last updated on 12 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.