@trackdays-web-scraper/trackdays-co-uk
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Web scraper for trackdays.co.uk

Build status Build Status

A small library for fetching event information from https://www.trackdays.co.uk

Note: I have no affiliation with trackdays.co.uk

Basic usage

npm install @trackdays-web-scraper/trackdays-co-uk

const trackdaysCoUkWebScraper = require('@trackdays-web-scraper/trackdays-co-uk');

trackdaysCoUkWebScraper.getEventSummaries()
    .then(events => {
        for (const event of events) {
            console.log(`${event.track.name} - ${event.track.layout} on ${event.eventDate}`);
        }
    });

API

getEventSummaries

Fetch summaries of all events for all vehicle types.

Method signature

getEventSummaries(): Promise<TrackdaySummary[]>;

getCarEventSummaries

Fetch summaries of all car track days.

Method signature

getCarEventSummaries(): Promise<TrackdaySummary[]>;

getBikeEventSummaries

Fetch summaries of all bike track days.

Method signature

getBikeEventSummaries(): Promise<TrackdaySummary[]>;

Return values

TrackdaySummary

{
    eventDate: '2017-07-15',
    format: 'Open Pitlane',
    groups: [
        { groupType: 'NOVICE', isFull: false },
        { groupType: 'INTERMEDIATE', isFull: true },
        { groupType: 'ADVANCED', isFull: false }
    ],
    isFull: false,
    noiseLimits: {
        static: { limit: 102, units: 'dB(A)' },
        driveBy: { limit: 92, units: 'dB(A)' }
    },
    pricing: {
        price: 139,
        priceCurrencyCode: 'GBP',
        priceCurrencySymbol: '£'
    },
    track: { name: 'Woodbridge', layout: 'Full Circuit' },
    vehicleType: 'CAR',
    id: 10721
};
Notes:
  • id will only be available if the track day is available (i.e. it can still be booked).
  • groups information is not always available. Sometimes an event may be available, but no group information will be supplied.
  • Noise limits (static and drive by) will be included if available. There absence does not necessarily mean there's no limit, just that the organiser has not provided the data.

Readme

Keywords

Package Sidebar

Install

npm i @trackdays-web-scraper/trackdays-co-uk

Weekly Downloads

0

Version

0.1.0

License

ISC

Last publish

Collaborators

  • tomseldon