Download the PHP package tomoehlrich/taxifarefinder without Composer
On this page you can find all versions of the php package tomoehlrich/taxifarefinder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tomoehlrich/taxifarefinder
More information about tomoehlrich/taxifarefinder
Files in tomoehlrich/taxifarefinder
Package taxifarefinder
Short Description A PHP/Laravel wrapper for the TaxiFareFinder API
License MIT
Homepage https://github.com/tomoehlrich/taxifarefinder-php
Informations about the package taxifarefinder
TaxiFareFinder
This package can retrieve supported cities, taxi businesses and taxi fare information from the TaxiFareFinder API.
The TaxiFareFinder API key can be requested under https://www.taxifarefinder.com/contactus.php.
Installation
This package can be installed through composer.
Laravel installation
This package can be used for Laravel and non-Laravel projects.
In Laravel 5.5+ the package will make use of the Laravel autoregister feature. In older versions of Laravel you have to manually install the package's service provider and facade.
Next, you have to publish the config file:
The config file contains only one option. Please make sure that your API key is available here.
Usage
First create a new instance of the TaxiFareFinder class.
You can get the nearest city that is supported by the API:
You can get details about a taxi fare.
You can get a list of taxi companies in a city.
In Laravel you can just call
To catch exceptions you should wrap methods in a try .. catch block.
This package comes with a couple of tests. Just enter your API key in tests/TestCase.php and run