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

acuityscheduling

v0.1.9

Published

Acuity Scheduling JS Dev Kit

Downloads

5,923

Readme

Acuity Scheduling API - JS Tool Kit

Welcome to the Acuity Scheduling JS SDK. This SDK provides examples and a standard library for integrating with the Acuity Scheduling API using JS. You can learn more about developing for Acuity Scheduling at developers.acuityscheduling.com.

Installation

This package can be installed for node using npm:

$ npm install --save acuityscheduling

Then require it in your app:

var Acuity = require('acuityscheduling');

Currently our API is only for server-side access and our SDK won't work on the client-side.

Hello World

Here's a basic example to get started. Just set your API credentials and run:

var Acuity = require('acuityscheduling');
var userId = null;
var apiKey = null;

var acuity = Acuity.basic({
  userId: userId,
  apiKey: apiKey
});

acuity.request('/appointments', function (err, res, appointments) {
  if (err) return console.error(err);
  console.log(appointments);
});

Examples

You'll find several examples of different Acuity integrations in the examples/ directory. These examples cover:

Sample examples/config.json

Create a config file with your API credentials to get started. All examples share a common config file containing your Acuity userId and apiKey for basic API access and verifying callbacks. OAuth2 examples require additional OAuth2 client account credentials.

{
	"userId": 1,
	"apiKey": "abc123"
}

Basic API Access

examples/basic/ is a basic API integration for a single account.

Start the example server by doing PORT=8000 node examples/basic/index.js and navigate to 127.0.0.1:8000

Create an Appointment

examples/create-appointment/ is a more advanced API example for scheduling an appointment. In this example, you'll see how to:

  • fetch appoinment types
  • find an available date and time
  • create the appointment

Start the example server by doing PORT=8000 node examples/create-appointment/index.js and navigate to 127.0.0.1:8000

OAuth2 API Access

examples/oauth2/ is an OAuth2 API integration. Use this to get connected with multiple Acuity accounts.

Create a config file with your OAuth2 credentials to get started. If you don't have OAuth2 credentials, please fill out this registration form. Start the example server by doing PORT=8000 node examples/oauth2/index.js and navigate to 127.0.0.1:8000

Sample examples/config.json
{
	"clientId": "N4HgVZbjHVp3HAkR",
	"clientSecret": "H33vYz88sEiKVbl7EMob1URDrqZrvceSCMmZJpAi",
	"redirectUri": "http://127.0.0.1:8000/oauth2"
}

Webhooks

examples/webhooks/ is a sample webhook integration.

Start the example server by doing PORT=8000 node examples/webhooks/index.js and navigate to 127.0.0.1:8000

Custom Sidebar

examples/custom-sidebar/ allows you to display custom information in the appointment details sidebar.

Start the example server by doing PORT=8000 node examples/custom-sidebar/index.js and navigate to 127.0.0.1:8000