0.1.16 • Published 4 years ago

feather-id v0.1.16

Weekly downloads
1
License
MIT
Repository
github
Last release
4 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

4 years ago

0.1.15

4 years ago

0.1.14

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.2

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago