GithubHelp home page GithubHelp logo

Comments (10)

grote avatar grote commented on July 17, 2024 1

How about using "FLIX" as a line number for all lines with the flix colors?

from public-transport-enabler.

schildbach avatar schildbach commented on July 17, 2024

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.

dotlambda avatar dotlambda commented on July 17, 2024

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.

dotlambda avatar dotlambda commented on July 17, 2024

If anyone is interested in what I've done so far, you can have a look here.

from public-transport-enabler.

schildbach avatar schildbach commented on July 17, 2024

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.

dotlambda avatar dotlambda commented on July 17, 2024

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.

grote avatar grote commented on July 17, 2024

How about just ignoring the time and arrival/departure value for now?

from public-transport-enabler.

grote avatar grote commented on July 17, 2024

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.

schildbach avatar schildbach commented on July 17, 2024

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.

dotlambda avatar dotlambda commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.