Skip to content

Commit

Permalink
Merge pull request #1 from b3none/develop
Browse files Browse the repository at this point in the history
v1.0.0
  • Loading branch information
B3none authored Feb 16, 2018
2 parents c283344 + e6f3ff1 commit 6588317
Show file tree
Hide file tree
Showing 5 changed files with 1,914 additions and 2 deletions.
57 changes: 55 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,55 @@
# emtapi
East Midlands Trains API Interface written in PHP.
# emtapi-client
East Midlands Trains API Client written in PHP.

# Composer
```$xslt
composer require b3none/emtapi-client
```

# Example use
```php
$emtapi = new \B3none\emtapi\EMTClient();
$emtapi->getJourneys('Derby', 'Nottingham');
```

# Example response
```php
[
'trains' => [
0 => [
'locationname' => 'Nottingham',
'st' => '16:40',
'et' => 'On time',
'cssclass' => null,
'operator' => 'CrossCountry',
'trainid' => '+eRxw6w7A8UJsGRGIAT5Ag==',
'platform' => '6A',
'selecteddets_sta' => '16:34',
'selecteddets_location' => 'Derby',
'selecteddets_length' => '23 minutes',
'selecteddets_prevlength' => '2 hours, 55 minutes',
'callingpoints' => [
'0' => [
'locationname' => 'Long Eaton',
'st' => '16:34',
'et' => 'On time',
'cssclass' => null
]
],
'previouscallingpoints' => [
0 => [
'locationname' => 'Cardiff Central',
'st' => '13:45',
'et' => null,
'cssclass' => 'circle-full',
'at' => 'On time'
]
]
]
]
]

```

# Credits
* Alex Blackham ([email protected])
23 changes: 23 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "b3none/emtapi",
"description": "East Midlands Trains PHP API Client",
"type": "library",
"authors": [
{
"name": "B3none",
"email": "[email protected]"
}
],
"require": {
"guzzlehttp/guzzle": "^6.3"
},
"require-dev": {
"phpunit/phpunit": "^6.3"
},
"autoload": {
"psr-4": {
"B3none\\emtapi\\": "src",
"B3none\\emtapi\\Tests\\": "tests"
}
}
}
Loading

0 comments on commit 6588317

Please sign in to comment.