GithubHelp home page GithubHelp logo

breeze-chms's Introduction

breeze-chms

The breeze-chms javascript library provides convenient access to the Breeze REST API from applications written in server-side JavaScript (Node).

Disclaimer: API wrappers are not necessarily created or maintained by Breeze.

Installation

Install the package with:

npm install breeze-chms --save
# or
yarn add breeze-chms

Usage

The package needs to be configured with your account's subdomain and secret API key. The subdomain is what comes before breezechms.com in your browser address bar. Your unique/secret API key is available on the Extensions page of your Breeze account https://YOURSUBDOMAIN.breezechms.com/extensions/api. Require the package and initialize it with values for your subdomain and API key.

NOTE: DO NOT hardcode, expose, or otherwise commit your API key to a repository.

const breeze = require('breeze-chms')('SUBDOMAIN', 'APIKEY');

breeze.people
  .get('PERSONID')
  .then((person) => console.log(person.id))
  .catch((error) => console.error(error));

Or using ES modules and async/await:

import Breeze from 'breeze-chms';
const breeze = new Breeze('SUBDOMAIN', 'APIKEY');

(async () => {
  const person = await breeze.people.get('PERSONID');
  console.log(person.id);
})();

This package uses Typescript and comes fully typed meaning it can provide code-hinting via Intellisense. If you're not familiar with Typescript—get started today!

Endpoints

Not all Breeze endpoints have been accounted for. See below for which ones are currently available. If you need something specific or have any comments, please open an issue—new endpoints will be implemented based on demand.

Dependencies

  • Axios - Promise based HTTP client for the browser and node.js

Contributing

Feel free to open a pull-request with any changes if you'd like to help out! To develop locally, go through these few steps to get up and running:

> git clone https://github.com/Notebird-App/breeze-chms
> cd breeze-chms
> npm install

Next, you'll need to add a .env file to the root directory that looks something like this (replacing the values with your own, of course):

subdomain=YOURSUBDOMAIN
key=YOURAPIKEY

This let's you properly run the tests via Jest. However, they might fail at first because they rely on a couple custom profile fields to be present in your account. So you can add Anniversary, Date joined, Service, and Room Number in your Breeze account as custom text fields. (You can remove these later if you wish)

Versioning

This project uses SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

breeze-chms's People

Contributors

cdoe avatar

Stargazers

 avatar Paul Falgout avatar  avatar John J avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.