Download the PHP package harmonicdigital/ldbws without Composer
On this page you can find all versions of the php package harmonicdigital/ldbws. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download harmonicdigital/ldbws
More information about harmonicdigital/ldbws
Files in harmonicdigital/ldbws
Package ldbws
Short Description An implementation to consume the Live Departure Board Web Service by National Rail
License MIT
Informations about the package ldbws
Live Departure Board Web Service (LDBWS) SDK
A lightweight PHP 8.3+ client for the National Rail UK Live Departure Board Web Service (LDBWS).
This library wraps the official REST endpoints exposed via Rail Data Marketplace and provides typed responses for station boards. It uses Guzzle under the hood and follows PSR-3 for logging.
- Package name:
harmonicdigital/ldbws - Minimum PHP: 8.3
- Transport: Guzzle (PSR-18 compatible via
guzzlehttp/guzzle), PSR-3 logging
Installation
Install via Composer:
You will need an API key for the Rail Data Marketplace (LDBWS). Supply it when constructing the client.
Features
Currently implemented service methods in HarmonicDigital\Ldbws\LdbwsClient:
1) getDepartureBoard() — Fetch a basic departure board for a station.
Example:
2) getDepartureBoardWithDetails() — Fetch a departure board including calling point details for services.
Example:
All methods may throw:
HarmonicDigital\Ldbws\Exception\LdbwsFaultExceptionwhen the API returns a known LDBWS faultHarmonicDigital\Ldbws\Exception\LdbwsUnknownExceptionfor unexpected transport or server errorsHarmonicDigital\Ldbws\Exception\UnparseableResponseExceptionwhen the response cannot be parsed
To Do
The following endpoints are present in the official swagger (config/ldbws-swagger.json) but are not yet implemented in LdbwsClient:
- GetArrivalBoard
- GetArrivalDepartureBoard
- GetArrBoardWithDetails
- GetArrDepBoardWithDetails
- GetFastestDepartures
- GetFastestDeparturesWithDetails
- GetNextDepartures
- GetNextDeparturesWithDetails
- GetServiceDetails
Implemented already:
- GetDepartureBoard
- GetDepBoardWithDetails (exposed as
getDepartureBoardWithDetails)
All versions of ldbws with dependencies
guzzlehttp/guzzle Version ^7.4.5
psr/http-client Version ^1.0
psr/log Version ^3.0