fars
TypeScript icon, indicating that this package has built-in type declarations

5.0.0 • Public • Published

fars

With this NPM package you can easily request info from FARS.

Usage

// Create FARS manager
const fars = new FARSManager(url: string, username?: string, password?: string)

// Request bookables
fars.getBookables(): Promise<IFarsBookable>

// Request bookings
fars.bookings(queryParameters: { after?: Date, before?: Date, bookable?: string, limit?: number }): Promise<IFarsSearchResult>

// Request bookings during a certain number of days into the future
fars.bookingsFromNow(days: number, queryParameters): Promise<IFarsSearchResult>

// Request bookings during a certain number of days into the future
fars.bookingsFromToday(days: number, queryParameters): Promise<IFarsSearchResult>

// Group an array of bookings by the bookable
fars.groupByBookable(reservations: IFarsBooking[]): Map<string, IFarsBooking[]>;

// Group an array of bookings by start date
fars.groupByDate = (reservations: IFarsBooking[]): Map<string, IFarsBooking[]>;

Package Sidebar

Install

npm i fars

Weekly Downloads

0

Version

5.0.0

License

ISC

Unpacked Size

7.61 kB

Total Files

8

Last publish

Collaborators

  • filiptypjeu