Skip to content

Commit f2c98cb

Browse files
committed
2 parents 2360910 + 190aa86 commit f2c98cb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ $ pipenv install
2121

2222
## Usage
2323
### Station information
24-
Now you can point your browser to http://localhost:9090/station/ID to see the magic. ID is the unique station-unit code;
25-
a list is provided by the http://localhost:9090/get-stations/ endpoint.
24+
Now you can point your browser to http://localhost:5000/station/ID to see the magic. ID is the unique station-unit code;
25+
a list is provided by the http://localhost:5000/get-stations/ endpoint.
2626

2727
For example, to get a JSON object with the current departure/arrival board & delay information for the Bucharest North
2828
railway station (the main & biggest one in our country), you would point your browser or the URL variable for whatever
29-
app you are consuming the data with to: http://localhost:9090/station/10017.
29+
app you are consuming the data with to: http://localhost:5000/station/10017.
3030

3131
### Train information
3232
In the same way you can get the current trains in a certain railway station, you can get the current information for a
3333
certain train. CFR provides information such as delays, the last station the train has passed (with a 7-minute delay),
3434
the next station and other useful information.
3535

36-
Just point your browser to http://localhost:9090/train/ID, where ID is the train's unique number. You can get these IDs
36+
Just point your browser to http://localhost:5000/train/ID, where ID is the train's unique number. You can get these IDs
3737
from the station information feed. For example, you can retrieve the information for train IR 1651 from Bucharest North
38-
to Suceava North (valid as of April 2017) by accessing http://localhost:9090/train/1651.
38+
to Suceava North (valid as of April 2017) by accessing http://localhost:5000/train/1651.
3939

4040
## Ideas
4141
While the official apps themselves work but may not look so great, romanian developers did their best to create some
@@ -63,18 +63,18 @@ offer their own API with proper rules and licensing at some point.
6363
#### Known limitations:
6464
- Requests are not authenticated and no rate limiting is implemented, so it's in no way ready to be exposed on the web.
6565
- This is not particularly fast, because the CFR Webpage isn't either. You'll probably want background requests and
66-
caching. After the initial request is made, it'll wait 8 seconds before parsing the data. If data hasn't been displayed
66+
caching. ~~After the initial request is made, it'll wait 8 seconds before parsing the data. If data hasn't been displayed
6767
on the webpage, it will wait an additional 20 seconds. After this, the API will output a blank object - this may mean
6868
that the scraped web service is down, it is really slow to respond or there are really no current trips stopping at that
69-
particular station (at night or at a small stop, for example).
69+
particular station (at night or at a small stop, for example).~~ Fixed: if the API is down you'll get a 5xx error status.
7070
- This is scraping and parsing, so any structural update to the CFR webpage, while highly unlikely in the near future
7171
may break this.
72-
- The train information feed does not provide the details regarding the train's delays and other useful information that
73-
Infofer offers with their service. This will be updated in the future.
72+
- ~~The train information feed does not provide the details regarding the train's delays and other useful information that
73+
Infofer offers with their service. This will be updated in the future.~~ Fixed: all public IRIS information is outputted on this API.
7474

7575
Public information web-service provided by CFR S.A. through Informatica Feroviara:
7676
http://appiris.infofer.ro/SosPlcRO.aspx, http://appiris.infofer.ro/MyTrainRO.aspx,
7777
http://appiris.infofer.ro/MersTrenRo.aspx. This is information from infrastructure administration and not a specific
7878
passenger carrier. Official passenger timetables are found here: http://mersultrenurilorcfr.ro, http://infofer.ro/
7979
and static data source with timetables updated at the end of each year:
80-
http://data.gov.ro/organization/sc-informatica-feroviara-sa
80+
http://data.gov.ro/organization/sc-informatica-feroviara-sa

0 commit comments

Comments
 (0)