fr-gas-price
v1.0.3
Published
Retrieve French gas price data from government website.
Downloads
14
Readme
fr-gas-price
Retrieve French gas price data from government website.
Overview
fr-gas-price is a library and a CLI tool to get the latest gas prices by gas type and region, in France.
Usage
fr-gas-price [options] <gas> <postcode>...
Arguments
Name | Description
---- | -----------
<gas>
| The gas type (name or ID, see below).
<postcode>
| One or more postcodes to fetch prices for.
Options
Name | Description
---- | -----------
-p, --pretty
| Show a pretty table instead of raw output.
Gas
Name | Description
---- | -----------
diesel
| 1
unleaded95
| 2
e85
| 3
gplc
| 4
unleaded95e10
| 5
unleaded98
| 6
Node
import { gas, gasPrice } from 'fr-gas-price'
const display = ({ city, name, brand, price, updated }) =>
doStuffWith(city, name, brand, price, updated)
gasPrice(gas.unleaded95, ...[38100, 38200])
.then(prices => prices.forEach(display))
Bugs
- The pagination is not supported. Only the first page per postcode is shown.