pbock / fahrplan Goto Github PK
View Code? Open in Web Editor NEWA JavaScript client for Deutsche Bahn's timetable API
License: MIT License
A JavaScript client for Deutsche Bahn's timetable API
License: MIT License
Do you want to represent the DB API as accurately as possible or rather just expose the nice things and leave out unnecessary stuff?
I was wondering if the places
list in the response for .station.get('โฆ')
is useful, since other services have better geocoding & POI search apis.
How does the software handle delayed trains? Is this kind of data provided via the API?
The API supports multiple languages (mainly for plain-text results such as the itinerary notes), defaulting to English. The client currently doesn't send this property, results are therefore in English.
Could (and probably will) be implemented as part of an options
object that's passed upon initialisation.
The API supports setting languages per-request, but the client will only support that if requested.
The API currently doesn't allow requests from web browsers due to a missing Access-Control-Allow-Origin
header, but support for web browsers could be added in advance.
The client doesn't throw/reject on all API errors yet, it sometimes resolves with an empty result when it should reject with an error.
Hey,
if your packaging the app within a webpack project, the BROWSER switch for your request library is not working.
The best way to check if your in a browser is
'use strict';
if (typeof window !== 'undefined') module.exports = require('./browser');
else module.exports = require('./node');
I've forwarded an already once forwarded E-Mail to [email protected]
After about 2 and a half days i received the following error-answer-mail:
Hi. This is the qmail-send program at corvus.uberspace.de.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
<[email protected]>:
//var/www/virtual/fahrkar/fahrkar/bin/parse-mail.js:3
const { MailParser } = require('mailparser');
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:945:3
I'm not going to try again; this message has been in the queue too long.
Explained in issue #3; when using Fahrplan.js with a bundler like Webpack, it'll include adapters for node.js's http
/https
modules, even though there's no need. The resulting bundle will likely work, but be needlessly bloated.
Can be resolved by setting the browser
field in package.json
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.