npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jmap-client

v0.1.0

Published

This lib help to make requests against a JMAP server

Downloads

310

Readme

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

or

bower install jmap-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 jmap.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-client.git
cd jmap-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, here's how you can release a new version:

  1. Checkout the master branch and pull the latest changes from the remote repository
  2. Run grunt release to do the release. A lot of things will happen but you'll eventually be back on the master branch
  3. Bump the version in master to NEXT_VERSION-dev (replace NEXT_VERSION by the supposed next version)

Roadmap

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

License

MIT