2.1.6 • Published 5 years ago

@jaketb/node-fred v2.1.6

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

node-fred ·

build status npm version Coverage Status Greenkeeper badge

A Fred2 API wrapper

The Fred API

Official Documentation

Wrapper Documentation

Installation Instructions

npm install node-fred --save

Example

Using Promises

import Fred from 'node-fred'

const fred = new Fred(API_KEY);

function getCategory(categoryID) {
  fred.categories.getCategory(125)
    .then((res) => {
      console.log('Category', res);
    })
    .catch((err) => {
      console.error('Error', err);
    });
}
getCategory(125);

Using async/await

import Fred from 'node-fred'

const fred = new Fred(API_KEY);

async function getCategory(categoryID) {
  try {
    const category = await fred.categories.getCategory(categoryID);
    console.log('Category', res);
  } catch (err) {
    console.error('Error', err);
  }
}
getCategory(125);
2.1.6

5 years ago

2.1.5

5 years ago

2.1.4

5 years ago

2.1.3

5 years ago