Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@olivercrockett/bookingapis
Advanced tools
A simple NPM package to access the BookingAPIs.dev API and allow you to take and manage bookings, hassle free.
The booking APIs aim to reduce the data load on the integrator and save them much work of coding in dates, reservations and more. The APIs provide a fully formed JSON for a site for a week, showcasing every appointment and their booked status.
Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.
You can get your API keys in your dashboard at any time, visit developers to generate or get your keys.
See an example of how to use our package
const { Bookings } = require("@olivercrockett/bookingapis");
const apiKey = "YOUR_API_KEY";
// Initialization
const bookings = new Bookings(apiKey);
// Get availability for a week
const site = STRING;
const date = STRING;
bookings
.getAvailability(site, date)
.then((response) => {
console.log("Returned availability : ", response);
})
.catch((err) => console.log("Getting availability error : ", err));
// Make a booking
const day_time = STRING;
const note = STRING;
const user = OJBECT;
const metadata = OBJECT;
bookings
.makeBooking(site, day_time, note, user, metadata)
.then((response) => {
console.log("Created booking : ", response);
})
.catch((err) => console.log("Creating booking error : ", err));
// Cancel a booking
const bookingId = STRING;
bookings
.cancelBooking(bookingId)
.then((response) => {
console.log("Cancelled booking : ", response);
})
.catch((err) => console.log("Cancelling booking error : ", err));
// Get bookings for a time range
const start = STRING; // '2023-06-06T00:00:00.000Z'
const end = STRING; // '2023-06-07T00:00:00.000Z'
bookings
.getBookings(start, end)
.then((response) => {
console.log("Returned bookings : ", response);
})
.catch((err) => console.log("Getting bookings error : ", err));
// Get bookings for a site
bookings
.getBookings(start, end, site)
.then((response) => {
console.log("Returned bookings : ", response);
})
.catch((err) => console.log("Getting bookings error : ", err));
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js. Node.js 0.10 or higher is required.
If this is a brand new project, make sure to create a package.json
first with
the npm init
command.
Installation is done using the
npm install
command:
$ npm install @olivercrockett/bookingapis
Follow our installing guide for more information.
The BookingAPIs.dev project welcomes all constructive contributions. Contributions take many forms, from code for bug fixes and enhancements, to additions and fixes to documentation, additional tests, trigging incoming pull requests and issues, and more!
See the Contributing Guide for more technical details on contributing.
If you discover a security vulnerability in PieCard, please see Security Policies and Procedures.
To run the test suite, first install the dependencies, then run npm test
:
$ npm install
$ npm test
The original author of BookingAPIs.dev and current lead maintainer is [Oliver Crockett](https://github.com/olivercrockett
FAQs
A simple NPM package to access the BookingAPIs.dev API and allow you to take and manage bookings, hassle free.
We found that @olivercrockett/bookingapis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.