Skip to content
Retrieve French gas price data from government website.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
src
.babelrc
.gitignore
README.md
UNLICENSE
package.json

README.md

fr-gas-price npm version

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.
You can’t perform that action at this time.