Comments (3)
You can use the autocomplete API to get a list of all stations:
$ curl "https://www.l.de/ajax_de?mode=autocomplete&q=&poi=&limit=2" | jq
{
"stations": [
{
"name": "Leipzig, Markt",
"lat": "51.339882282118",
"lng": "12.374237209778",
"distance": "0.078350872860768"
},
{
"name": "Leipzig, Reichsstraße",
"lat": "51.341836324787",
"lng": "12.376662567095",
"distance": "0.19867293290099325"
}
]
}
You can set the limit as high as you like!
$ curl "https://www.l.de/ajax_de?mode=autocomplete&q=&poi=&limit=1000" | jq | grep name | wc -l`
877
So, this endpoint returns up to 877 stations. A word of warning: Don't call this too often, or they might add a hard limit. Cache it, updating it every few weeks should be quite enough.
As you see this will only provide you with the station names, so after you select one you still have to call the stations API to acquire the ID.
Maybe I'll have time to implement this later, but we really need to cache it.
from lvb.
Sorry for the very late response. Unfortunately, there is no such endpoint available, as fas as I know. Maybe @hashworks knows more?
from lvb.
Liste der Haltestelle
haltestellen.txt
n
from lvb.
Related Issues (13)
- An in-range update of eslint is breaking the build 🚨 HOT 6
- Source of your data? HOT 2
- Exception when querying for journeys HOT 1
- An in-range update of depcheck is breaking the build 🚨 HOT 2
- stations(query, [opt]) not returning a station object for a valid station HOT 2
- Departures gives JSON error HOT 3
- FetchError: Maybe LVB has changed their Site again HOT 2
- Stations which are also stops for local or long distance trains have no stationID. HOT 1
- LVB API no longer uses IDs HOT 3
- An in-range update of moment-timezone is breaking the build 🚨 HOT 6
- Stops containing a slash cannot be found HOT 1
- An in-range update of tape is breaking the build 🚨 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lvb.