@criptext/api

0.17.6 • Public • Published

Module for sending HTTP request to the Criptext Email API. This is specifically designed to be used by our electron app and backend integration tests.

Install

Install with yarn:

yarn add @criptext/api

This module is private so make sure you have run npm login with the necessary credentials on your dev machine.

Usage

This module exports a class: {@link ClientAPI}, which you can instantiate and call its methods to send requests to the server.

const ClientAPI = require('@criptext/email-http-client');

const client = new ClientAPI();

const credentials = {
  username: 'tester',
  password: 'R3alS3cuREp@s$w0rd',
  deviceId: 1
};

client.login(credentials)
  .then(() => console.log('logged in!'))
  .catch((err) => console.error('something went wrong', err));

Documentation

Currently the only way to read documentation is to build it yourself. After you clone this repository navigate to the root of this package and run:

yarn --frozen-lockfile
yarn jsdoc

Now open out/index.html on a web browser.

Readme

Keywords

none

Package Sidebar

Install

npm i @criptext/api

Weekly Downloads

93

Version

0.17.6

License

UNLICENSED

Unpacked Size

490 kB

Total Files

13

Last publish

Collaborators

  • criptext