johannilsson / sthlmtraveling

STHLM Traveling helps you plan your journeys using data from Stockholm Public Transport (SL, Stockholms Lokaltrafik) on your Android phone
http://sthlmtraveling.se/
Apache License 2.0
114 stars 38 forks source link

The import com.markupartist.sthlmtraveling.ApiSettings cannot be resolved #5

Closed morganchristiansson closed 14 years ago

morganchristiansson commented 14 years ago

Hi.

I'm trying to get your project set up eclipse but the class com.markupartist.sthlmtraveling.ApiSettings .

What is this API? It does not appear to be the same as the normal sl.se API? Is there any documentation or information regarding this API and why is the application not communicating directly with sl.se?

johannilsson commented 14 years ago

The class ApiSettings is described under "Setting up the project" in the README file. This file holds the enpoint to the API. Sl does not provide an API and I have not open sourced the API that I have built on top of sl.se yet. But (this should be moved to ApiSettings) the class Planner has a field named "mUseMockData" that you can set to true to mock the API. Hope that this will get you started.

STHLM Traveling is not communication direct to sl.se because of maintenance issues, if sl.se changes their website we can easily change the API backend without pushing a new release throw Market.

morganchristiansson commented 14 years ago

Ok, well this is a valid reason. I think it's well known that these companies want to have full control over their data even at the cost of innovation. There are many examples of this including Skånetrafiken and also Ann Arbor A2DDA http://www.voiptechchat.com/voip/255/a2dda-blocks-asterisk-parking-data/

I have some plans for improving the usability of this application however I'm a bit concerned about investing too much in when it is dependant on the availability of your closed API. Essentially you have put yourself as a middleman between SL and the STHML Travel application.

Also btw I downloaded the STHML Travel .apk file off my android and found the "secret" API endpoint URL, it could also be obtained easily by running a packet capture. Do you have any objections against using it for development and publishing apps using this URL?

johannilsson commented 14 years ago

I know it is pretty easy to find the endpoint if you really want to find it. I would prefer if you would not publish any new apps towards this API, but please send me an email and we can discuss this further.

Don't get me wrong, I'm not trying to hide anything. The main reason I have not released the source for this API is because I am discussing with sl regarding proper API access and I don't want to upset them even more than we have already done with the screen scraping.

I'm also working on some changes to the UI for the app, as well as some code clean up. I'm also discussing the changes with a designer that has sent me some really nice looking mocks. But please send me an email and I can forward them to you for feedback and comments if you like.

morganchristiansson commented 14 years ago

I saw this article regarding SL opening up for APIs. Would be totally awesome if they did it and open up a lot of possibilities for new web and mobile applications. http://www.idg.se/2.1085/1.243947/sl-oppnar-for-att-slappa-data

I/we also just did some mockups, I will send them to you. Looking forward to receiving your mockups to see what you came up with.