npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mindbody-node-client

v1.0.2

Published

Starter node-client for the MindBody SOAP API.

Downloads

6

Readme

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

Client Service

  • AddOrUpdateClients
  • GetClients

Site Service

  • 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