2017 © Pedro Peláez
 

library tiket-api

Laravel package for using api tiket.com

image

itsmeabde/tiket-api

Laravel package for using api tiket.com

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

Stories in Ready, (*1)

Laravel Tiket Api's

Latest Version on Packagist ![Software License][ico-license] Total Downloads, (*2)

This package provides you to use tiket.com api with simple usage and it will let you focus on development of the api's user interface. See the DOCS for documentation, (*3)

Install

Via composer, (*4)

``` bash $ composer require itsmeabde/tiket-api, (*5)


Once this has finish, you will need to add the service provider to the ```providers``` array in your ```app.php``` config as follows: ``` php itsmeabde/TiketApi/TiketApiServiceProvider::class

Finally, you will want to publish the config using the following command: ``` bash $ php artisan vendor:publish, (*6)

## Usage

Before usage, you mush configure ```api_key, user_agent, response ``` in ```tiket.php``` config file. by default ``` 'response' => 'json'``` , do not change any uri if there is no available updated.

This package by default store token api in cookie with key ```token```. do not forget to configure your ```EncryptCookies.php``` in ```App\Http\Middleware``` folder.

``` php
protected $except = [
    'token'
];

Example request search flight: ``` php use Illuminate\Http\Request; use itsmeabde\TiketApi\TiketApi;, (*7)

class FlightController extends Controller { public function searchFlight(Request $request) { $query = $request->all(); $tiket = new TiketApi(); $response = $tiket->flightApi->searchFlight($query);, (*8)

    return $response;
}

}, (*9)


Or you want create your own controller extends baseController ``` php use Illuminate\Routing\Controller as BaseController; use itsmeabde\TiketApi\TiketApi; class BaseTiketController extends BaseController { public $tiket; public function __construct() { $this->tiket = new TiketApi(); } }

So you can call tiket object from class inheritance your own Controller without declare new object tiketApi for many times. ``` php use Illuminate\Http\Request;, (*10)

class FlightController extends BaseTiketController { public function searchFlight(Request $request) { $query = $request->all();, (*11)

    return $this->tiket->flightApi->searchFlight($query);
}

} ```, (*12)

For more information, See DOCS., (*13)

Change log

Please see CHANGELOG for more information what has changed recently., (*14)

Contributing

Please see CONTRIBUTING for details., (*15)

Bug

If you discover any bug related issues, please email itsmeabde@gmail.com instead of using the issue tracker., (*16)

License

The MIT License (MIT). Please see License File for more information., (*17)

The Versions

06/04 2018

dev-master

9999999-dev https://github.com/itsmeabde/tiket-api

Laravel package for using api tiket.com

  Sources   Download

MIT

The Requires

 

The Development Requires

itsmeabde tiket api

30/08 2016

1.0.1

1.0.1.0 https://github.com/itsmeabde/tiket-api

Laravel package for using api tiket.com

  Sources   Download

MIT

The Requires

 

The Development Requires

itsmeabde tiket api

30/08 2016

1.0.0

1.0.0.0 https://github.com/itsmeabde/TiketApi

Laravel package for using api tiket.com

  Sources   Download

MIT

The Requires

 

The Development Requires

itsmeabde tiketapi