prepare for v6 📝💚
This commit is contained in:
parent
9e6cc8ed6b
commit
4b333ea9be
9 changed files with 44 additions and 44 deletions
6
.github/workflows/docker-image.yml
vendored
6
.github/workflows/docker-image.yml
vendored
|
@ -2,7 +2,7 @@ name: build & publish Docker image
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 5
|
- 6
|
||||||
jobs:
|
jobs:
|
||||||
lint-test:
|
lint-test:
|
||||||
name: lint & test
|
name: lint & test
|
||||||
|
@ -35,7 +35,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
derhuerst/db-rest:5
|
derhuerst/db-rest:6
|
||||||
derhuerst/db-rest:latest
|
derhuerst/db-rest:latest
|
||||||
|
|
||||||
# this is for the public-transport/infrastructure cluster
|
# this is for the public-transport/infrastructure cluster
|
||||||
|
@ -55,4 +55,4 @@ jobs:
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/${{github.repository}}:v5_${{steps.hash.outputs.hash}}_${{steps.datetime.outputs.datetime}}
|
tags: ghcr.io/${{github.repository}}:v6_${{steps.hash.outputs.hash}}_${{steps.datetime.outputs.datetime}}
|
||||||
|
|
|
@ -16,9 +16,9 @@ FROM node:alpine
|
||||||
LABEL org.opencontainers.image.title="db-rest"
|
LABEL org.opencontainers.image.title="db-rest"
|
||||||
LABEL org.opencontainers.image.description="A clean REST API wrapping around the Deutsche Bahn API."
|
LABEL org.opencontainers.image.description="A clean REST API wrapping around the Deutsche Bahn API."
|
||||||
LABEL org.opencontainers.image.authors="Jannis R <mail@jannisr.de>"
|
LABEL org.opencontainers.image.authors="Jannis R <mail@jannisr.de>"
|
||||||
LABEL org.opencontainers.image.documentation="https://github.com/derhuerst/db-rest/tree/5"
|
LABEL org.opencontainers.image.documentation="https://github.com/derhuerst/db-rest/tree/6"
|
||||||
LABEL org.opencontainers.image.source="https://github.com/derhuerst/db-rest"
|
LABEL org.opencontainers.image.source="https://github.com/derhuerst/db-rest"
|
||||||
LABEL org.opencontainers.image.revision="5"
|
LABEL org.opencontainers.image.revision="6"
|
||||||
LABEL org.opencontainers.image.licenses="ISC"
|
LABEL org.opencontainers.image.licenses="ISC"
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ COPY --from=builder /app/docs ./docs
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
ENV HOSTNAME v5.db.transport.rest
|
ENV HOSTNAME v6.db.transport.rest
|
||||||
ENV PORT 3000
|
ENV PORT 3000
|
||||||
|
|
||||||
CMD ["node", "index.js"]
|
CMD ["node", "index.js"]
|
||||||
|
|
44
api-docs.js
44
api-docs.js
|
@ -4,13 +4,13 @@ const generateApiDocs = require('hafas-rest-api/tools/generate-docs')
|
||||||
const {api} = require('./api')
|
const {api} = require('./api')
|
||||||
|
|
||||||
const HEAD = `\
|
const HEAD = `\
|
||||||
# \`v5.db.transport.rest\` API documentation
|
# \`v6.db.transport.rest\` API documentation
|
||||||
|
|
||||||
[\`v5.db.transport.rest\`](https://v5.db.transport.rest/) is a [REST API](https://restfulapi.net). Data is being returned as [JSON](https://www.json.org/).
|
[\`v6.db.transport.rest\`](https://v6.db.transport.rest/) is a [REST API](https://restfulapi.net). Data is being returned as [JSON](https://www.json.org/).
|
||||||
|
|
||||||
You can just use the API without authentication. There's a [rate limit](https://apisyouwonthate.com/blog/what-is-api-rate-limiting-all-about) of 100 request/minute (burst 200 requests/minute) set up.
|
You can just use the API without authentication. There's a [rate limit](https://apisyouwonthate.com/blog/what-is-api-rate-limiting-all-about) of 100 request/minute (burst 200 requests/minute) set up.
|
||||||
|
|
||||||
[OpenAPI playground](https://petstore.swagger.io/?url=https%3A%2F%2Fv5.db.transport.rest%2F.well-known%2Fservice-desc%0A)
|
[OpenAPI playground](https://petstore.swagger.io/?url=https%3A%2F%2Fv6.db.transport.rest%2F.well-known%2Fservice-desc%0A)
|
||||||
|
|
||||||
*Note:* The examples snippets in this documentation uses the \`url-encode\` CLI tool of the [\`url-decode-encode-cli\` package](https://www.npmjs.com/package/url-decode-encode-cli) for [URL-encoding](https://de.wikipedia.org/wiki/URL-Encoding).
|
*Note:* The examples snippets in this documentation uses the \`url-encode\` CLI tool of the [\`url-decode-encode-cli\` package](https://www.npmjs.com/package/url-decode-encode-cli) for [URL-encoding](https://de.wikipedia.org/wiki/URL-Encoding).
|
||||||
`
|
`
|
||||||
|
@ -92,7 +92,7 @@ const examples = {
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
curl 'https://v5.db.transport.rest/locations?query=halle&results=1' -s | jq
|
curl 'https://v6.db.transport.rest/locations?query=halle&results=1' -s | jq
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
\`\`\`js
|
\`\`\`js
|
||||||
|
@ -120,7 +120,7 @@ curl 'https://v5.db.transport.rest/locations?query=halle&results=1' -s | jq
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
curl 'https://v5.db.transport.rest/stops/nearby?latitude=53.5711&longitude=10.0015' -s | jq
|
curl 'https://v6.db.transport.rest/stops/nearby?latitude=53.5711&longitude=10.0015' -s | jq
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
\`\`\`js
|
\`\`\`js
|
||||||
|
@ -160,7 +160,7 @@ curl 'https://v5.db.transport.rest/stops/nearby?latitude=53.5711&longitude=10.00
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
curl 'https://v5.db.transport.rest/stops/reachable-from?latitude=53.553766&longitude=9.977514&address=Hamburg,+Holstenwall+9' -s | jq
|
curl 'https://v6.db.transport.rest/stops/reachable-from?latitude=53.553766&longitude=9.977514&address=Hamburg,+Holstenwall+9' -s | jq
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
\`\`\`js
|
\`\`\`js
|
||||||
|
@ -200,7 +200,7 @@ curl 'https://v5.db.transport.rest/stops/reachable-from?latitude=53.553766&longi
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
curl 'https://v5.db.transport.rest/stops/8010159' -s | jq
|
curl 'https://v6.db.transport.rest/stops/8010159' -s | jq
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
\`\`\`js
|
\`\`\`js
|
||||||
|
@ -229,7 +229,7 @@ curl 'https://v5.db.transport.rest/stops/8010159' -s | jq
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
# autocomplete using db-stations-autocomplete
|
# autocomplete using db-stations-autocomplete
|
||||||
curl 'https://v5.db.transport.rest/stations?query=dammt' -s | jq
|
curl 'https://v6.db.transport.rest/stations?query=dammt' -s | jq
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
\`\`\`js
|
\`\`\`js
|
||||||
|
@ -265,7 +265,7 @@ curl 'https://v5.db.transport.rest/stations?query=dammt' -s | jq
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
# filter db-stations by \`hasParking\` property
|
# filter db-stations by \`hasParking\` property
|
||||||
curl 'https://v5.db.transport.rest/stations?hasParking=true' -s | jq
|
curl 'https://v6.db.transport.rest/stations?hasParking=true' -s | jq
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
\`\`\`js
|
\`\`\`js
|
||||||
|
@ -287,7 +287,7 @@ curl 'https://v5.db.transport.rest/stations?hasParking=true' -s | jq
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
# filter db-stations by \`hasDBLounge\` property, get newline-delimited JSON
|
# filter db-stations by \`hasDBLounge\` property, get newline-delimited JSON
|
||||||
curl 'https://v5.db.transport.rest/stations?hasDBLounge=true' -H 'accept: application/x-ndjson' -s | jq
|
curl 'https://v6.db.transport.rest/stations?hasDBLounge=true' -H 'accept: application/x-ndjson' -s | jq
|
||||||
\`\`\`
|
\`\`\`
|
||||||
`,
|
`,
|
||||||
'/stations/:id': `\
|
'/stations/:id': `\
|
||||||
|
@ -295,9 +295,9 @@ curl 'https://v5.db.transport.rest/stations?hasDBLounge=true' -H 'accept: applic
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
# lookup Halle (Saale) Hbf
|
# lookup Halle (Saale) Hbf
|
||||||
curl 'https://v5.db.transport.rest/stations/8010159' -s | jq
|
curl 'https://v6.db.transport.rest/stations/8010159' -s | jq
|
||||||
curl 'https://v5.db.transport.rest/stations/LH' -s | jq # RIL100/DS100
|
curl 'https://v6.db.transport.rest/stations/LH' -s | jq # RIL100/DS100
|
||||||
curl 'https://v5.db.transport.rest/stations/LHG' -s | jq # RIL100/DS100
|
curl 'https://v6.db.transport.rest/stations/LHG' -s | jq # RIL100/DS100
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
\`\`\`js
|
\`\`\`js
|
||||||
|
@ -328,7 +328,7 @@ curl 'https://v5.db.transport.rest/stations/LHG' -s | jq # RIL100/DS100
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
# at Halle (Saale) Hbf, in direction Berlin Südkreuz
|
# at Halle (Saale) Hbf, in direction Berlin Südkreuz
|
||||||
curl 'https://v5.db.transport.rest/stops/8010159/departures?direction=8011113&duration=120' -s | jq
|
curl 'https://v6.db.transport.rest/stops/8010159/departures?direction=8011113&duration=120' -s | jq
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
\`\`\`js
|
\`\`\`js
|
||||||
|
@ -370,7 +370,7 @@ curl 'https://v5.db.transport.rest/stops/8010159/departures?direction=8011113&du
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
# at Halle (Saale) Hbf, 10 minutes
|
# at Halle (Saale) Hbf, 10 minutes
|
||||||
curl 'https://v5.db.transport.rest/stops/8010159/arrivals?duration=10' -s | jq
|
curl 'https://v6.db.transport.rest/stops/8010159/arrivals?duration=10' -s | jq
|
||||||
\`\`\`
|
\`\`\`
|
||||||
`,
|
`,
|
||||||
'/journeys': `\
|
'/journeys': `\
|
||||||
|
@ -378,9 +378,9 @@ curl 'https://v5.db.transport.rest/stops/8010159/arrivals?duration=10' -s | jq
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
# stop/station to POI
|
# stop/station to POI
|
||||||
curl 'https://v5.db.transport.rest/journeys?from=8010159&to.id=991561765&to.latitude=51.483641&to.longitude=11.980841' -s | jq
|
curl 'https://v6.db.transport.rest/journeys?from=8010159&to.id=991561765&to.latitude=51.483641&to.longitude=11.980841' -s | jq
|
||||||
# without buses, with ticket info
|
# without buses, with ticket info
|
||||||
curl 'https://v5.db.transport.rest/journeys?from=…&to=…&bus=false&tickets=true' -s | jq
|
curl 'https://v6.db.transport.rest/journeys?from=…&to=…&bus=false&tickets=true' -s | jq
|
||||||
\`\`\`
|
\`\`\`
|
||||||
`,
|
`,
|
||||||
'/journeys/:ref': `\
|
'/journeys/:ref': `\
|
||||||
|
@ -388,11 +388,11 @@ curl 'https://v5.db.transport.rest/journeys?from=…&to=…&bus=false&tickets=tr
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
# get the refreshToken of a journey
|
# get the refreshToken of a journey
|
||||||
journey=$(curl 'https://v5.db.transport.rest/journeys?from=…&to=…&results=1' -s | jq '.journeys[0]')
|
journey=$(curl 'https://v6.db.transport.rest/journeys?from=…&to=…&results=1' -s | jq '.journeys[0]')
|
||||||
refresh_token=$(echo $journey | jq -r '.refreshToken')
|
refresh_token=$(echo $journey | jq -r '.refreshToken')
|
||||||
|
|
||||||
# refresh the journey
|
# refresh the journey
|
||||||
curl "https://v5.db.transport.rest/journeys/$(echo $refresh_token | url-encode)" -s | jq
|
curl "https://v6.db.transport.rest/journeys/$(echo $refresh_token | url-encode)" -s | jq
|
||||||
\`\`\`
|
\`\`\`
|
||||||
`,
|
`,
|
||||||
'/trips/:id': `\
|
'/trips/:id': `\
|
||||||
|
@ -400,12 +400,12 @@ curl "https://v5.db.transport.rest/journeys/$(echo $refresh_token | url-encode)"
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
# get the trip ID of a journey leg
|
# get the trip ID of a journey leg
|
||||||
journey=$(curl 'https://v5.db.transport.rest/journeys?from=…&to=…&results=1' -s | jq '.journeys[0]')
|
journey=$(curl 'https://v6.db.transport.rest/journeys?from=…&to=…&results=1' -s | jq '.journeys[0]')
|
||||||
journey_leg=$(echo $journey | jq -r '.legs[0]')
|
journey_leg=$(echo $journey | jq -r '.legs[0]')
|
||||||
trip_id=$(echo $journey_leg | jq -r '.tripId')
|
trip_id=$(echo $journey_leg | jq -r '.tripId')
|
||||||
|
|
||||||
# fetch the trip
|
# fetch the trip
|
||||||
curl "https://v5.db.transport.rest/trips/$(echo $trip_id | url-encode)" -s | jq
|
curl "https://v6.db.transport.rest/trips/$(echo $trip_id | url-encode)" -s | jq
|
||||||
\`\`\`
|
\`\`\`
|
||||||
`,
|
`,
|
||||||
'/radar': `\
|
'/radar': `\
|
||||||
|
@ -413,7 +413,7 @@ curl "https://v5.db.transport.rest/trips/$(echo $trip_id | url-encode)" -s | jq
|
||||||
|
|
||||||
\`\`\`shell
|
\`\`\`shell
|
||||||
bbox='north=53.555&west=9.989&south=53.55&east=10.001'
|
bbox='north=53.555&west=9.989&south=53.55&east=10.001'
|
||||||
curl "https://v5.db.transport.rest/radar?$bbox&results=10" -s | jq
|
curl "https://v6.db.transport.rest/radar?$bbox&results=10" -s | jq
|
||||||
\`\`\`
|
\`\`\`
|
||||||
`,
|
`,
|
||||||
}
|
}
|
||||||
|
|
2
api.js
2
api.js
|
@ -70,7 +70,7 @@ const config = {
|
||||||
description: pkg.description,
|
description: pkg.description,
|
||||||
homepage: pkg.homepage,
|
homepage: pkg.homepage,
|
||||||
version: pkg.version,
|
version: pkg.version,
|
||||||
docsLink: 'https://github.com/derhuerst/db-rest/blob/5/docs/readme.md',
|
docsLink: 'https://github.com/derhuerst/db-rest/blob/6/docs/readme.md',
|
||||||
openapiSpec: true,
|
openapiSpec: true,
|
||||||
logging: true,
|
logging: true,
|
||||||
aboutPage: false,
|
aboutPage: false,
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<rect class="box" x="0" y="0" width="100" height="41" />
|
<rect class="box" x="0" y="0" width="100" height="41" />
|
||||||
<text class="monospace-text" x="26.2" y="13">db-rest</text>
|
<text class="monospace-text" x="26.2" y="13">db-rest</text>
|
||||||
<text class="normal-text small-text" x="4" y="26">deployed at</text>
|
<text class="normal-text small-text" x="4" y="26">deployed at</text>
|
||||||
<text class="monospace-text small-text" x="4" y="36">v5.db.transport.rest</text>
|
<text class="monospace-text small-text" x="4" y="36">v6.db.transport.rest</text>
|
||||||
</g>
|
</g>
|
||||||
<g transform="translate(269, 14)">
|
<g transform="translate(269, 14)">
|
||||||
<path class="arrow" d="M0,14 L50,14" />
|
<path class="arrow" d="M0,14 L50,14" />
|
||||||
|
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -1,4 +1,4 @@
|
||||||
# Getting Started with `v5.db.transport.rest`
|
# Getting Started with `v6.db.transport.rest`
|
||||||
|
|
||||||
Let's walk through the **requests that are necessary to implement a typical basic transit app**.
|
Let's walk through the **requests that are necessary to implement a typical basic transit app**.
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ The following code snippets use [`curl`](https://curl.haxx.se) (a versatile comm
|
||||||
The `/locations?query=…` route allows you to query stops, points of interest (POIs) & addresses. We're only interested in stops though, so we filter using `poi=false&addresses=false`:
|
The `/locations?query=…` route allows you to query stops, points of interest (POIs) & addresses. We're only interested in stops though, so we filter using `poi=false&addresses=false`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl 'https://v5.db.transport.rest/locations?poi=false&addresses=false&query=südkreuz' -s | jq
|
curl 'https://v6.db.transport.rest/locations?poi=false&addresses=false&query=südkreuz' -s | jq
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
@ -78,7 +78,7 @@ curl 'https://v5.db.transport.rest/locations?poi=false&addresses=false&query=sü
|
||||||
Let's fetch 5 of the next departures at *Berlin Südkreuz* (which has the ID `8011113`):
|
Let's fetch 5 of the next departures at *Berlin Südkreuz* (which has the ID `8011113`):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl 'https://v5.db.transport.rest/stops/8011113/departures?results=5' -s | jq
|
curl 'https://v6.db.transport.rest/stops/8011113/departures?results=5' -s | jq
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
@ -160,7 +160,7 @@ We call a connection from A to B – at a specific date & time, made up of secti
|
||||||
Let's fetch 2 journeys from `8011113` (*Berlin Südkreuz*) to `8010159` (*Halle (Saale)Hbf*), departing tomorrow at 2pm (at the time of writing this).
|
Let's fetch 2 journeys from `8011113` (*Berlin Südkreuz*) to `8010159` (*Halle (Saale)Hbf*), departing tomorrow at 2pm (at the time of writing this).
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl 'https://v5.db.transport.rest/journeys?from=8011113&to=8010159&departure=tomorrow+2pm&results=2' -s | jq
|
curl 'https://v6.db.transport.rest/journeys?from=8011113&to=8010159&departure=tomorrow+2pm&results=2' -s | jq
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
@ -316,4 +316,4 @@ Note that `departure` includes the `departureDelay`, and `arrival` includes the
|
||||||
|
|
||||||
### 4. more features
|
### 4. more features
|
||||||
|
|
||||||
These are the basics. Check the full [API docs](api.md) for all features or use the [OpenAPI playground](https://petstore.swagger.io/?url=https%3A%2F%2Fv5.db.transport.rest%2F.well-known%2Fservice-desc%0A) or explore the API!
|
These are the basics. Check the full [API docs](api.md) for all features or use the [OpenAPI playground](https://petstore.swagger.io/?url=https%3A%2F%2Fv6.db.transport.rest%2F.well-known%2Fservice-desc%0A) or explore the API!
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# `v5.db.transport.rest` documentation
|
# `v6.db.transport.rest` documentation
|
||||||
|
|
||||||
[`v5.db.transport.rest`](https://v5.db.transport.rest/) is a [REST API](https://restfulapi.net) for the public transportation system in Germany.
|
[`v6.db.transport.rest`](https://v6.db.transport.rest/) is a [REST API](https://restfulapi.net) for the public transportation system in Germany.
|
||||||
|
|
||||||
[![API status](https://badgen.net/uptime-robot/status/m784879516-8a977fa91b975fc3884a9857)](https://stats.uptimerobot.com/57wNLs39M/784879516)
|
[![API status](https://badgen.net/uptime-robot/status/m784879516-8a977fa91b975fc3884a9857)](https://stats.uptimerobot.com/57wNLs39M/784879516)
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ Because it wraps [an API](https://github.com/public-transport/hafas-client/blob/
|
||||||
|
|
||||||
- [Getting Started](getting-started.md)
|
- [Getting Started](getting-started.md)
|
||||||
- [API documentation](api.md)
|
- [API documentation](api.md)
|
||||||
- [OpenAPI playground](https://petstore.swagger.io/?url=https%3A%2F%2Fv5.db.transport.rest%2F.well-known%2Fservice-desc%0A)
|
- [OpenAPI playground](https://petstore.swagger.io/?url=https%3A%2F%2Fv6.db.transport.rest%2F.well-known%2Fservice-desc%0A)
|
||||||
|
|
||||||
## Why use this API?
|
## Why use this API?
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"version": "5.0.2",
|
"version": "5.0.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"author": "Jannis R <mail@jannisr.de>",
|
"author": "Jannis R <mail@jannisr.de>",
|
||||||
"homepage": "https://github.com/derhuerst/db-rest/tree/5",
|
"homepage": "https://github.com/derhuerst/db-rest/tree/6",
|
||||||
"repository": "derhuerst/db-rest",
|
"repository": "derhuerst/db-rest",
|
||||||
"bugs": "https://github.com/derhuerst/db-rest/issues",
|
"bugs": "https://github.com/derhuerst/db-rest/issues",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|
10
readme.md
10
readme.md
|
@ -1,12 +1,12 @@
|
||||||
# db-rest
|
# db-rest
|
||||||
|
|
||||||
**A clean REST API wrapping around the [Deutsche Bahn HAFAS API](https://github.com/public-transport/db-hafas#db-hafas).** It is deployed at [`v5.db.transport.rest`](https://v5.db.transport.rest/).
|
**A clean REST API wrapping around the [Deutsche Bahn HAFAS API](https://github.com/public-transport/db-hafas#db-hafas).** It is deployed at [`v6.db.transport.rest`](https://v6.db.transport.rest/).
|
||||||
|
|
||||||
[**API Documentation**](docs/readme.md)
|
[**API Documentation**](docs/readme.md)
|
||||||
|
|
||||||
![db-rest architecture diagram](architecture.svg)
|
![db-rest architecture diagram](architecture.svg)
|
||||||
|
|
||||||
[![API status](https://badgen.net/uptime-robot/status/m784879516-8a977fa91b975fc3884a9857)](https://stats.uptimerobot.com/57wNLs39M/784879516)
|
[![API status](https://badgen.net/uptime-robot/status/m793274556-25c5e9bbab0297d91cda7134)](https://stats.uptimerobot.com/57wNLs39M/793274556)
|
||||||
[![dependency status](https://img.shields.io/david/derhuerst/db-rest.svg)](https://david-dm.org/derhuerst/db-rest)
|
[![dependency status](https://img.shields.io/david/derhuerst/db-rest.svg)](https://david-dm.org/derhuerst/db-rest)
|
||||||
![ISC-licensed](https://img.shields.io/github/license/derhuerst/db-rest.svg)
|
![ISC-licensed](https://img.shields.io/github/license/derhuerst/db-rest.svg)
|
||||||
[![support me via GitHub Sponsors](https://img.shields.io/badge/support%20me-donate-fa7664.svg)](https://github.com/sponsors/derhuerst)
|
[![support me via GitHub Sponsors](https://img.shields.io/badge/support%20me-donate-fa7664.svg)](https://github.com/sponsors/derhuerst)
|
||||||
|
@ -19,10 +19,10 @@
|
||||||
|
|
||||||
### via Docker
|
### via Docker
|
||||||
|
|
||||||
A Docker image [is available as `derhuerst/db-rest:5`](https://hub.docker.com/r/derhuerst/db-rest:5).
|
A Docker image [is available as `derhuerst/db-rest:6`](https://hub.docker.com/r/derhuerst/db-rest:6).
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker run -d -p 3000:3000 derhuerst/db-rest:5
|
docker run -d -p 3000:3000 derhuerst/db-rest:6
|
||||||
```
|
```
|
||||||
|
|
||||||
*Note:* The Docker image does not contain the Redis server.
|
*Note:* The Docker image does not contain the Redis server.
|
||||||
|
@ -32,7 +32,7 @@ docker run -d -p 3000:3000 derhuerst/db-rest:5
|
||||||
```shell
|
```shell
|
||||||
git clone https://github.com/derhuerst/db-rest.git
|
git clone https://github.com/derhuerst/db-rest.git
|
||||||
cd db-rest
|
cd db-rest
|
||||||
git checkout 5
|
git checkout 6
|
||||||
npm install --production
|
npm install --production
|
||||||
|
|
||||||
redis-server &
|
redis-server &
|
||||||
|
|
Loading…
Reference in a new issue