Skip to content

Retrieve H35/H70 hydrogen fuel availability and quantity from CAFCP data source

License

Notifications You must be signed in to change notification settings

mechawrench/cafcp-hydrogen-station-fuel-status

Repository files navigation

CAFCP Hydrogen Station Fuel Status

cafcp-hydrogen-station-fuel-status Package

run-tests Latest Version on Packagist Total Downloads

Retrieves the hydrogen station fuel availability status from CAFCP. Lists both H70 and H35 status and quantity. This package works with Laravel 7.x.

Installation

You can install the package via composer:

composer require mechawrench/cafcp-hydrogen-station-fuel-status

Usage

// All station actions
$stations = CafcpHydrogenStationFuelStatus::getAllStations();

$stations_offline = $stations->where('statusH70', 'offline')->all();

// Single station actions
// Get Station names from https://cafcp.org/stationmap
$station = CafcpHydrogenStationFuelStatus::getStationStatus('Diamond Bar');

$station_name = $station->station;
$statusH70 = $station->statusH70;
$capacity70 = $station->capacity70;
$statusH35 = $station->statusH35;
$capacityH35 = $station->capacityH35;

Find all locations directly from CAFCP

https://cafcp.org/stationmap

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

MIT