0.2.1 • Published 2 years ago
ergast-f1 v0.2.1
ergast-f1
Module to access Ergast API data
Installation
npm i ergast-f1
Usage
.all()
returns entire list of selected function
.filters()
takes a json as argument with filter type as key
Example
ergast.seasons.all()
ergast.seasons.filter({ driver: "hamilton", result: 1 })
gives response from https://ergast.com/api/f1/drivers/hamilton/results/1/seasons.json
Filters list
seasons.filters() and races.filters()
- circuit
- constructor
- driver
- grid
- result
- fastest
- status
results.filters()
- circuit
- constructor
- driver
- grid
- result
- fastest
- status
- year
- round - will be ignored if specified without year
qualifying.filters()
- circuit
- constructor
- driver
- grid
- result
- fastest
- status
- standing
- year
- round - will be ignored if specified without year
standings.drivers.filters()
- year
- round
- driver
- standing
standings.constructors.filter()
- year
- round
- constructor
- standing
drivers.filters() and constructor.filters()
- circuit
- constructor
- driver
- grid
- result
- fastest
- status
- standing
- year
- round - will be ignored if specified without year
status.filters()
- circuit
- constructor
- driver
- grid
- result
- fastest
- status
- year
- round - will be ignored if specified without year
lapTime.filters()
- year
- round
- driver
- lap
pitStops.filters()
- year
- round
- driver
- lap
- pitstop