Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from andaryjo/add-ticker
Browse files Browse the repository at this point in the history
Add ticker
  • Loading branch information
andaryjo authored Mar 25, 2021
2 parents fe4b0db + 44db9da commit 390b0b5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
|---|---|---|---|---|---|
Expand All @@ -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 |
|---|---|---|---|---|---|
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/trias/TRIASDeparturesHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export class TRIASDeparturesHandler {
const result: DeparturesResult = {
success: true,
departures,
ticker
};

resolve(result);
Expand Down
1 change: 1 addition & 0 deletions src/types/results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ interface Result {

interface DeparturesResult extends Result {
departures?: FPTFStopover[];
ticker?: string[];
}

interface StopsResult extends Result {
Expand Down

0 comments on commit 390b0b5

Please sign in to comment.