harmonysite
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

HarmonySite Client

Client library for the HarmonySite API.

Usage

Work with HarmonySite support to enable the API for your group.

It's use the api browser (https://myharmonysite.com/dbpage.php?pg=api) to create a token, select the authorise option. You can also use client.authorise once to get a token, but it's not recommended for normal use.

const HarmonySite = require('harmonysite');

// Instantiate a new choir genius instance with the url of your site
const harmonySite = new HarmonySite('https://www.hcamusic.org');

const username = process.env.HARMONYSITE_USERNAME;
const password = process.env.HARMONYSITE_PASSWORD;

// Log into harmony site, this must be called once before the other
// functions will work. The documentation references a `token` instead of
// usernames and passwords, but the API requires tracking cookies as well,
// so this must be called before any other calls.
await harmony.authorise(username, password);

// Fetch all your users
const members = await harmony.browse({
  table: 'members',
});

Readme

Keywords

none

Package Sidebar

Install

npm i harmonysite

Weekly Downloads

3

Version

2.0.1

License

MIT

Unpacked Size

16.5 kB

Total Files

15

Last publish

Collaborators

  • barlock