Comments (10)
How about using "FLIX" as a line number for all lines with the flix colors?
from public-transport-enabler.
Hey, that's great!
Almost all of the providers started with reverse engineering, and still do (even though in some cases there is some incomplete but official documentation). Yes, maintaining the provider will continue to take effort.
I am not a lawyer, but my understanding is if the data is published by the public transit authority you (an app) can forward it to the user as long as it doesn't take ownership of the data. Otherwise, web browsers or terminal clients would not be legal.
I take it the number of stops FlixBus serves is tiny, compared to the typical number of train or bus stops. So I think downloading the entire list of stops is a valid approach for now. We currently do not use caching with okhttp, but it would be easy to do I guess.
from public-transport-enabler.
The API doesn't seem to provide line numbers (not even the website does), so would it be ok to make the line
argument of the Public
constructor nullable?
I'm not very proficient in Java, so I don't know what @Nullable
does when put in front of an argument or a variable declaration. Is the checkNotNull()
function the old way of doing it?
from public-transport-enabler.
If anyone is interested in what I've done so far, you can have a look here.
from public-transport-enabler.
For now, just remove the checkNotNull() if its easier for you. @nullable is just a hint for your IDE to show an error if you potentially pass a null as a not-nullable argument.
We'll will have to decide if we keep it like that or if we just provide dummy line numbers. If we allow null in this field the various apps will need to provide dummy appearances of lines without any number.
from public-transport-enabler.
Flixbus also only supports searching by day, not by time and doesn't support searching by arrival date.
Should we add new capabilities for that?
from public-transport-enabler.
How about just ignoring the time and arrival/departure value for now?
from public-transport-enabler.
You could also remove all trips before the specified time manually after receiving the result and only show what is after the time to the user.
from public-transport-enabler.
Yeah, just ignore the time for now. For now, I'd also not remove trips from the result. Let's see how it works out, we can optimize later.
from public-transport-enabler.
Since Flixbus operates in multiple countries, a station can have different names depending on which language version you request. The language is choosen via the Accept-Language
header.
Is there already a provider that is available in multiple languages?
Else, what would be the proper way to deal with that? I think since a supplemental header shouldn't hurt any of the other API endpoints, we could simply add an optional argument to the AbstractNetworkProvider
that sets the appropriate (standardized) header via httpClient.setHeader()
. I'm however not sure what the should be passed to the constructor: something like en-US
or more like English (United States)
.
from public-transport-enabler.
Related Issues (20)
- VOR: java.lang.RuntimeException: AUTH HCI Core: Authorization fail HOT 1
- BRITISHCOLUMBIA: java.lang.IllegalArgumentException: Unhandled error message: The region ca-bc doesn't exists HOT 1
- VVO: java.lang.RuntimeException: uncategorized problem
- Possible data source: Mobility Database
- DB: android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787 SQLITE_CONSTRAINT_FOREIGNKEY) HOT 1
- Walking time as parameter for EFA HOT 2
- SNCB: java.lang.RuntimeException: CLIENTVERSION HOT 2
- SYDNEY: java.lang.RuntimeException: uncategorized problem while processing https://transportnsw.info/web/XML_TRIP_REQUEST2?outputFormat=XML&language=en&stateless=1&coordOutputFormat=WGS84[DD.ddddd]&coordOutputFormatTail=7&sessionID=0&requestID=0&coordListOutputFormat=string&type_origin=stop&name_origin=10101100&type_destination=stop&name_destination=10101101&itdDate=20231214&itdTime=2156&itdTripDateTimeDepArr=dep&calcNumberOfTrips=6&ptOptionsActive=1&itOptionsActive=1&routeType=LEASTTIME&changeSpeed=normal&includedMeans=checkbox&inclMOT_0=on&inclMOT_14=on&inclMOT_15=on&inclMOT_16=on&inclMOT_0=on&inclMOT_13=on&inclMOT_18=on&inclMOT_1=on&inclMOT_2=on&inclMOT_3=on&inclMOT_4=on&inclMOT_5=on&inclMOT_6=on&inclMOT_7=on&inclMOT_17=on&inclMOT_19=on&inclMOT_9=on&inclMOT_8=on&inclMOT_10=on&trITMOTvalue100=10&locationServerActive=1&useRealtime=1&nextDepsPerLeg=1&inclMOT_11=on&inclMOT_17=on
- VBB: android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787) HOT 2
- VRS disappeared from list HOT 2
- VRR: android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787 SQLITE_CONSTRAINT_FOREIGNKEY[787])
- IT: java.lang.IllegalArgumentException: Unhandled error id: no_origin
- GTFS without Navitia HOT 4
- SNCF real-time data
- Crash on NS (Netherlands) HOT 1
- Location: equals(…) is not symmetric
- IT: java.lang.IllegalArgumentException: Unhandled error id: no_destination
- MVV Trip Delays are always 0 HOT 4
- Add support for STIB (Brussels) HOT 1
- BEG (BayernProvider) has no colors for S-Bahn lines in Munich
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 public-transport-enabler.