0.1.16 • Published 5 years ago

feather-id v0.1.16

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Feather Node.js Library

npm Build Status Coverage Status

This library provides a convenient interface to the Feather API for applications running in a Node.js server environment.

Installation

$ npm install feather-id --save
# or
$ yarn add feather-id

Usage

The Feather package must be initialized with your project's API key, available on the Feather Dashboard. Include the API key when you require the package:

const feather = require("feather-id")("live_...");

Using Promises

Every method returns a promise:

feather.credentials
  .create({
    type: "username|password",
    username: "jdoe",
    password: "pa$$w0rd"
  })
  .then(credential => {
    return feather.sessions.create({
      credential_token: credential.token
    });
  })
  .then(session => {
    return feather.users.retrieve(session.user_id);
  })
  .then(user => {
    // User of the newly created session
  })
  .catch(error => {
    // Handle errors
  });

Development

If you do not have yarn installed, you can install it with npm install --global yarn.

Run the tests:

$ yarn install
$ yarn test

More Information

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.2

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago