https://github.com/elythi0n/tallink
🛳️ A lightweight PHP client for the Tallink API.
https://github.com/elythi0n/tallink
api-client ferry sdk-php tallink transport
Last synced: 5 months ago
JSON representation
🛳️ A lightweight PHP client for the Tallink API.
- Host: GitHub
- URL: https://github.com/elythi0n/tallink
- Owner: elythi0n
- License: mit
- Created: 2018-12-15T05:14:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2026-01-12T12:54:41.000Z (5 months ago)
- Last Synced: 2026-01-14T14:50:55.088Z (5 months ago)
- Topics: api-client, ferry, sdk-php, tallink, transport
- Language: PHP
- Homepage:
- Size: 121 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/marcosraudkett/tallink/actions/workflows/run-tests.yml)
# PHP SDK for the Tallink API
This is an unofficial Tallink PHP SDK and should not be used in production without asking permission from Tallink.
## Requirements
- PHP 8.1+
If you're using an older version of PHP then you can use the [2.1.0](https://github.com/marcosraudkett/tallink/releases/tag/2.1.0) version but it's highly recommended that you use the latest version.
## Installation
```
composer require marcosraudkett/tallink
```
## Usage
Example on how to fetch journeys
### Journeys
```php
use marcosraudkett\Tallink\Constants\Voyage;
use marcosraudkett\Tallink\Constants\Locale;
use marcosraudkett\Tallink\Constants\Station;
use marcosraudkett\Tallink\Requests\GetTimetablesRequest;
use marcosraudkett\Tallink\Tallink;
$tallink = new Tallink;
$response = $tallink->send(new GetTimetablesRequest(
oneWay: true,
voyageType: Voyage::SHUTTLE,
dateFrom: date('Y-m-d'),
dateTo: date('Y-m-d', strtotime('+2 days')),
from: Station::HELSINKI, // hel
to: Station::TALLINN, // tal
locale: Locale::ENGLISH, // en
));
print_r($journeys->json());
```
Check inside [/examples](/examples/) folder for more.
## Available requests
| Request | Description |
| - | - |
| GetTimetablesRequest | Get the list of journeys |
| GetTravelClassesRequest | Get the list of travel classes |
| GetVehiclesRequest | Get the list of vehicle availability & pricing |
| GetMealsRequest | Get the list of meal plans |
| GetHotelsRequest | Get the list of hotels |
| GetLandRequest | Get the list of land services |
| GetOnboardServicesRequest | Get the list of onboard services |
## Testing
```
composer test
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Feel free to open a pull request or report an issue.
## Credits
- [Marcos Raudkett](https://github.com/marcosraudkett)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.