334.0.11 ā€¢ Published 3 years ago

slay-gtfs-realtime v334.0.11

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

Slay šŸ’„

āœØ yes

How to use

const { TripInfo } = require("slay-gtfs-realtime");

const { stops, shapes, delay?, predictedLocation?, lastStop?, serving?, nextStop? } = TripInfo({
    stops: [
        {
            location: [52.215481561, 21.2114879], // stop location
            arrival?: new Date(), // bus arrival
            departure: new Date(), // bus departure
            distance?: 31584, // you don't have to fill this, if you want know how this works, look at code
            meta?: any // anything, name, zone, your credit card number
        },
        ... // more stops, as many as you want
    ],
    shapes: [ // array of vehicle shape locations
        [52.215481561, 21.2114879],
        [53.215481561, 22.2114879],
        [54.215481561, 23.2114879] 
    ],
    location?: [52.215481561, 21.2114879], // if you want have real time data like delay, live departures, provide current vehicle location
    moveStopsToLine?: true, // default: false, all stops that are in shape radius (30 meters) will be moved to line
    predictLocation?: false // default: false, predict current vehicle location if not available realtime
});

i'm too lazy to make result effects, just look at typings

334.0.11

3 years ago

334.0.1

3 years ago

334.0.0

3 years ago

333.333.334

3 years ago

333.333.333

3 years ago

21.37.1

3 years ago

21.37.0

3 years ago

1.0.0

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago