1.1.5 • Published 2 years ago

asp-sdk-queries v1.1.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

ASP-SDK-Queries

SDK for ASP-Queries API, fetches all reservations from a specific book for a date range. Requires organization Api key.

Instructions

Example use:

const sdk = require("asp-sdk-queries");
const moment = require("moment");

const apiURL = "http://hostname/api/queries/reservations/";
const apiKey = "b12a1469-2182-4e2d-a3db-57c392172cee";
const bookId = 1;
const startDate = moment().format("YYYY-MM-DD");
const endDate = moment().add(5, "days").format("YYYY-MM-DD");

(async () => {
	const reservations = await sdk.fetch(apiURL, apiKey, bookId, startDate, endDate);

	console.log("Reservations: ", reservations.response.data);
})();

Where:

  • apiURL: API URL starting with "http://" and ending with "/api/queries/reservations/"
  • apiKey: Organization api key
  • bookId: ID from the book to fetch reservations
  • startDate: Start date with format "YYYY-MM-DD"
  • endDate: End date with format "YYYY-MM-DD"
1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago