Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rebelliard/stockholm-transit-api
πΈπͺ Stockholm Transit APIs π
https://github.com/rebelliard/stockholm-transit-api
stockholm storstockholms trafiklab
Last synced: 27 days ago
JSON representation
πΈπͺ Stockholm Transit APIs π
- Host: GitHub
- URL: https://github.com/rebelliard/stockholm-transit-api
- Owner: rebelliard
- License: mit
- Created: 2022-07-26T00:00:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-02T21:27:12.000Z (over 2 years ago)
- Last Synced: 2024-10-05T01:08:10.044Z (about 1 month ago)
- Topics: stockholm, storstockholms, trafiklab
- Language: TypeScript
- Homepage:
- Size: 1010 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-sweden - Javascript
README
# πΈπͺ Stockholm Transit APIs π
[![CI](https://github.com/rebelliard/stockholm-transit-api/actions/workflows/ci.yml/badge.svg)](https://github.com/rebelliard/stockholm-transit-api/actions/workflows/ci.yml)
Storstockholms Lokaltrafiks (SL) APIs:
- [Location lookup](https://www.npmjs.com/package/@stockholm-transit/locations)
- [Departures](https://www.npmjs.com/package/@stockholm-transit/departures)
- [Service alerts](https://www.npmjs.com/package/@stockholm-transit/service-alerts)## Development server
Run `npm run start` for an [example API server](https://github.com/rebelliard/stockholm-transit-api/blob/main/apps/example-api/src/main.ts):
- [http://localhost:3333/api/locations?q=T-Centralen](http://localhost:3333/api/locations?q=T-Centralen)
- [http://localhost:3333/api/departures?siteId=9001](http://localhost:3333/api/departures?siteId=9001)
- [http://localhost:3333/api/service-alerts?siteId=9001](http://localhost:3333/api/service-alerts?siteId=9001)Expected environment variables:
- `STOCKHOLM_LOCATIONS_API_KEY`
- `STOCKHOLM_DEPARTURES_API_KEY`
- `STOCKHOLM_SERVICE_ALERTS_API_KEY`Read how to generate Trafiklab API keys [here](https://www.trafiklab.se/docs/using-trafiklab/getting-api-keys/).
## Publishing
A guide on publishing an NX library to NPM is available [here](https://blog.nrwl.io/publishing-react-libraries-made-easy-d5b3d013deba#:~:text=Publishing%20to%20npm).