mkorkmaz / tk-api-php-sdk
This package is abandoned and no longer maintained.
The author suggests using the mkorkmaz/tk-api-php-client package instead.
Turkish Airlines TK API Unofficial PHP Client
2.1
2019-03-25 07:38 UTC
Requires
- php: ^7.2
- ext-json: *
- guzzlehttp/guzzle: ^6.3
- monolog/monolog: ^1.23
- psr/http-message: ^1.0
- psr/log: ^1.0
- robinvdvleuten/ulid: ^3.0
Requires (Dev)
README
See the official documentation at Turkish Airlines Developer Portal
To use this library, one has to create a developer account on Developer Portal and create an application to get required API Key and API Secret.
Installation
composer require mkorkmaz/tk-api-php-client
Configuration
Put your API Key and API Secret securely in a configuration file or .env etc. Since calling an API endpoint is rate-limited, it is important to secure these information.
Use https://api.turkishairlines.com/test as your api test url during development.
Creating API Client
<?php include 'vendor/autoload.php'; use TK\API\ClientBuilder; $client = ClientBuilder::create() ->setEnvironment(getenv('TK_API_URL'), getenv('TK_API_KEY'), getenv('TK_API_SECRET')) ->build();
Endpoints
Disclaimer
This TK API Client Library is not officially recognized by Turkish Airlines.