Coder Social home page Coder Social logo

mindbody-node-client's Introduction

Mind Body API - Node.js Client

I couldn't find a client implemented in Node for the Mind Body API beyond this long-forgotten PR, so I took that PR and used it as the basis for creating what you now see before you.

As you can see, the codebase currently only handles a couple of endpoints, (the ones that I used in my project) and has only two tests written (which are designed to serve more as examples than anything else).

Additionally, everything is currently in one file; I imagine that if we added more endpoints that we'd need to modularize things a bit to avoid a bit of a mess, but that wouldn't be hard at all should the need arise.

Feel free to contribute!

Supported Endpoints

  • AddOrUpdateClients
  • GetClients
  • GetActivationCode

Installation

npm install --save mindbody-node-client

Standard Usage (Env. Variables)

const MindBodyAPI = require('mindbody-node-client');
const mindBodyAPI = new MindBodyAPI();

mindBodyAPI.GetClients().then(result => {
  console.log(result);
  // do some stuff with the client
});

By default, the library will use the environment variables listed further down on this page.

However, you can also explicitly pass in your credentials when you're creating an instance of the module. These will always overwrite your env. variables (if present).

Explicit Usage (Config. Object)

const MindBodyAPI = require('mindbody-node-client');
const mindBodyAPI = new MindBodyAPI({
  sourceName: 'foo',
  sourcePassword: 'bar',
  siteID: '-99',
  username: 'foo',
  password: 'bar',
});

mindBodyAPI.GetClients().then(result => {
  console.log(result);
  // do some stuff with the client
});

Environment Variables

  • SourceCredentials
    • Name: MB_SOURCE_NAME
    • Password: MB_SOURCE_PASSWORD
  • UserCredentials
    • Username: MB_USERNAME
    • Password: MB_PASSWORD

mindbody-node-client's People

Contributors

azjgard avatar

Stargazers

 avatar Oleksii Strizhak avatar

Watchers

James Cloos avatar Glenn Engel avatar  avatar

mindbody-node-client's Issues

License?

I was just checking this out and thinking about contributing, but I didn't see a license. Please add one so I know what my contributions will be licensed as ๐Ÿ’ƒ

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.