0.3.2 • Published 7 years ago

flarum-client v0.3.2

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
7 years ago

Flarum-client

A simple client to the flarum forum software api.

Usage

General usage looks like this

const FlarumClient = require('flarumClient');

const settings = {
  "apiUrl": "http://example.org/api",
  "adminUsername": "username", // you will need to create an account with admin privileges on flarum
  "adminPassword": "password"
}
const flarumClient = new FlarumClient(settings);
flarumClient.getUser('username').then((user) => {
  console.log(user);
})

logging

If you want better logging, you can install bunyan and pass an instance to the init, like this:

const bunyan = require('bunyan');
const logger = bunyan.createLogger({name: "myapp"});
const flarumClient = new FlarumClient(settings, logger);

Documentation of functions

You can find the documentations of the functions (generated by jsdoc) here.

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.4

7 years ago