Final Update :3
This commit is contained in:
parent
583effdc06
commit
c416a56925
178
README.md
178
README.md
|
@ -15,7 +15,6 @@ Allgemeines
|
|||
|
||||
**Was muss ich beachten?**
|
||||
* Der Code bzw. die API ist nicht von einem Profi, sondern von einem Lehrling im ersten Lehrjahr programmiert worden. Deswegen bitte ich um ausschließlich konstruktive Kritik.
|
||||
* Zu jeder Funktion gibt es auch ein Beispiel. Siehe PDF.
|
||||
* Es gelten die Allgemeinen Geschäftsbedingungen und die Nutzungsbedingungen von [oebb.at](http://oebb.at). [http://www.oebb.at/de/Nutzungsbedingungen/index.jsp](http://www.oebb.at/de/Nutzungsbedingungen/index.jsp)
|
||||
* Es wird keine Haftung übernommen! Sie sind für ihr Handeln selbst verantwortlich. Der Rechtsweg ist ausgeschlossen!
|
||||
|
||||
|
@ -55,6 +54,30 @@ Station validieren - validate()
|
|||
| id | int | Irgend eine ÖBB Stations ID | Nein |
|
||||
|
||||
|
||||
|
||||
***Beispiel***
|
||||
```php
|
||||
<?php
|
||||
|
||||
header('Content-type: text/html; charset=utf-8');
|
||||
require_once "oebbApi.php";
|
||||
|
||||
$api = new oebbApi();
|
||||
var_dump($api->validate("St. Pölten"));
|
||||
|
||||
```
|
||||
```
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(2) {
|
||||
["value"]=>
|
||||
string(10) "ST.PÖLTEN"
|
||||
["id"]=>
|
||||
string(9) "001130201"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Verbindung suchen - get()
|
||||
-----------
|
||||
|
||||
|
@ -99,6 +122,64 @@ Verbindung suchen - get()
|
|||
|
||||
|
||||
|
||||
***Beispiel***
|
||||
```php
|
||||
<?php
|
||||
|
||||
header('Content-type: text/html; charset=utf-8');
|
||||
require_once "oebbApi.php";
|
||||
|
||||
$api = new oebbApi();
|
||||
$connections = $api->get("St. Pölten", "Linz", 1);
|
||||
var_dump($connections);
|
||||
|
||||
```
|
||||
```
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(14) {
|
||||
["startStation"]=>
|
||||
string(14) "St.Pölten Hbf"
|
||||
["endStation"]=>
|
||||
string(14) "Linz/Donau Hbf"
|
||||
["startDate"]=>
|
||||
string(10) "16.01.2014"
|
||||
["endDate"]=>
|
||||
string(10) "16.01.2014"
|
||||
["startTime"]=>
|
||||
string(5) "19:56"
|
||||
["endTime"]=>
|
||||
string(5) "20:45"
|
||||
["duration"]=>
|
||||
string(4) "0:49"
|
||||
["changes"]=>
|
||||
int(0)
|
||||
["buyLink"]=>
|
||||
string(127) "https://ticketing.oebb.at/inet/pub/ticket?outwardDateTime=2014-01-16T19%3A56&stationOrigEva=001130201&stationDestEva=001140101&"
|
||||
["changesLink"]=>
|
||||
string(347) "http://fahrplan.oebb.at/bin/query.exe/dn?ld=19&seqnr=1&ident=ed.04333180.1389897270&GO_conViewMode=outward&HWAI=CONNECTION$C0-0!id=C0-0!HwaiConId=C0-0!HwaiDetailStatus=details!HwaiMoreDetailStatus=none!HwaiAdditionalInformation=none!HwaiConnectionNumber=1!;~CONNECTION$C0-0!HwaiMapStatus=UNDEFINED!HwaiMapNumber=UNDEFINED!HwaiMapSlider=UNDEFINED!;"
|
||||
["products"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(2) {
|
||||
["name"]=>
|
||||
string(6) "RJ 764"
|
||||
["img"]=>
|
||||
string(46) "http://fahrplan.oebb.at/img/vs_oebb/rj_pic.gif"
|
||||
}
|
||||
}
|
||||
["prognose"]=>
|
||||
string(0) ""
|
||||
["id"]=>
|
||||
int(0)
|
||||
["earlier"]=>
|
||||
string(5) "18:56"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
||||
Details einer Verbindung - getDetails
|
||||
-----------
|
||||
|
||||
|
@ -143,6 +224,63 @@ Details einer Verbindung - getDetails
|
|||
| | duration | string | Fahrzeit der Verbindung | Nein |
|
||||
|
||||
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
header('Content-type: text/html; charset=utf-8');
|
||||
require_once "oebbApi.php";
|
||||
|
||||
$api = new oebbApi();
|
||||
var_dump($api->getDetails(0));
|
||||
|
||||
```
|
||||
```
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(3) {
|
||||
["start"]=>
|
||||
array(5) {
|
||||
["station"]=>
|
||||
string(17) "St.Pölten Hbf"
|
||||
["time"]=>
|
||||
string(6) " 19:56"
|
||||
["plattform"]=>
|
||||
string(1) "5"
|
||||
["date"]=>
|
||||
string(10) "16.01.2014"
|
||||
["prognose"]=>
|
||||
string(10) "pünktlich"
|
||||
}
|
||||
["end"]=>
|
||||
array(5) {
|
||||
["station"]=>
|
||||
string(18) "Linz/Donau Hbf"
|
||||
["time"]=>
|
||||
string(6) " 20:45"
|
||||
["plattform"]=>
|
||||
string(4) "6A-C"
|
||||
["date"]=>
|
||||
string(10) "16.01.2014"
|
||||
["prognose"]=>
|
||||
string(10) "pünktlich"
|
||||
}
|
||||
["data"]=>
|
||||
array(4) {
|
||||
["productName"]=>
|
||||
string(6) "RJ 764"
|
||||
["productImg"]=>
|
||||
string(46) "http://fahrplan.oebb.at/img/vs_oebb/rj_pic.gif"
|
||||
["productUrl"]=>
|
||||
string(221) "http://fahrplan.oebb.at/bin/traininfo.exe/dn/618567/292343/760906/174264/181?ld=19&seqnr=3&ident=ed.04333180.1389897270&date=16.01.2014&station_evaId=8100008&station_type=dep&journeyStartIdx=5&journeyEndIdx=9&backLink=tp&"
|
||||
["duration"]=>
|
||||
string(5) "06:12"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Koordinaten einer ganzen Verbindung - getCoords()
|
||||
-----------
|
||||
|
||||
|
@ -172,8 +310,46 @@ Sie müssen nur die Funktion „getDetails“ mit der jeweiligen Verwundung aufr
|
|||
| realName | string | Debugging Name | Nein |
|
||||
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
header('Content-type: text/html; charset=utf-8');
|
||||
require_once "oebbApi.php";
|
||||
|
||||
$api = new oebbApi();
|
||||
var_dump($api->getCoords());
|
||||
|
||||
```
|
||||
```array
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(2) {
|
||||
[0]=>
|
||||
array(4) {
|
||||
["name"]=>
|
||||
string(14) "St.Pölten Hbf"
|
||||
["xcoord"]=>
|
||||
string(8) "15623800"
|
||||
["ycoord"]=>
|
||||
string(8) "48208331"
|
||||
["realName"]=>
|
||||
string(13) "St.Plten Hbf"
|
||||
}
|
||||
[1]=>
|
||||
array(4) {
|
||||
["name"]=>
|
||||
string(14) "Linz/Donau Hbf"
|
||||
["xcoord"]=>
|
||||
string(8) "14291814"
|
||||
["ycoord"]=>
|
||||
string(8) "48290150"
|
||||
["realName"]=>
|
||||
string(14) "Linz/Donau Hbf"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue