From 0c591abd7306d545c3ebaba92899bf63d174a435 Mon Sep 17 00:00:00 2001 From: andaryjo Date: Thu, 25 Mar 2021 23:23:07 +0100 Subject: [PATCH 1/3] add ticker implementation --- src/trias/TRIASDeparturesHandler.ts | 1 + src/types/results.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/trias/TRIASDeparturesHandler.ts b/src/trias/TRIASDeparturesHandler.ts index 98b2e5c..88a51e5 100644 --- a/src/trias/TRIASDeparturesHandler.ts +++ b/src/trias/TRIASDeparturesHandler.ts @@ -123,6 +123,7 @@ export class TRIASDeparturesHandler { const result: DeparturesResult = { success: true, departures, + ticker }; resolve(result); diff --git a/src/types/results.ts b/src/types/results.ts index f5c3cf5..402984a 100644 --- a/src/types/results.ts +++ b/src/types/results.ts @@ -4,6 +4,7 @@ interface Result { interface DeparturesResult extends Result { departures?: FPTFStopover[]; + ticker?: string[]; } interface StopsResult extends Result { From 2505c8c046ae3e6634cf9fe9ad789f35aa8d2bd9 Mon Sep 17 00:00:00 2001 From: andaryjo Date: Thu, 25 Mar 2021 23:26:01 +0100 Subject: [PATCH 2/3] update docs --- README.md | 1 + docs/README.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f883e88..3977a50 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ This client aims to be an easy to use and lightweight implementation for the pub The TRIAS Client currently only supports two basic functionalities: - Searching for stops (either using a name or coordinates). - Fetching departures for a stop. +- Reading current ticker news for a stop. ## Usage diff --git a/docs/README.md b/docs/README.md index 0dd7677..70ce1f6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -24,7 +24,7 @@ This function returns a client that you can use to perform requests against a TR ## client.getStops(StopsRequestOptions options) -This function returns a list of deparures for a given stop. It requires `StopsRequestOptions` and will return a Promise which resolves into a `StopsResult`. + This function returns a list of stops that fit the given search criteria. It requires `StopsRequestOptions` and will return a Promise which resolves into a `StopsResult`. | Paramater | Description | Type | Required | Default | Example | |---|---|---|---|---|---| @@ -36,7 +36,7 @@ This function returns a list of deparures for a given stop. It requires `StopsRe ## client.getDepartures(DeparturesRequestOptions options) -This function returns a list of stops that fit the given search criteria. It requires `DeparturesRequestOptions` and will return a Promise which resolves into a `DeparturesResult`. +This function returns a list of departures and ticker information for a given stop. It requires `DeparturesRequestOptions` and will return a Promise which resolves into a `DeparturesResult`. | Paramater | Description | Type | Required | Default | Example | |---|---|---|---|---|---| From 44db9da4867ba8d09dd527a541fb080c1f4077bf Mon Sep 17 00:00:00 2001 From: andaryjo Date: Thu, 25 Mar 2021 23:26:32 +0100 Subject: [PATCH 3/3] bump version to 0.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a378c4e..b4c6067 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "trias-client", - "version": "0.1.3", + "version": "0.2.0", "description": "Lean Node.js client for public transport TRIAS APIs.", "keywords": [ "public-transport",