sandeepchowdary7 / laratriposo
Simple and extensible Triposo API PHP Client with Laravel Support based on Guzzle 6
V2.0.0
2019-06-11 05:42 UTC
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^6.3
- laravel/framework: 5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*
This package is auto-updated.
Last update: 2024-10-08 07:16:53 UTC
README
A Laravel wrapper for Triposo's PHP wrapper for their REST API
Simple and extensible Triposo API PHP Client with Laravel Facade and ServiceProvider based on Guzzle 6 Currently it supports only userless endpoint requests.
Installation
- Add the package as a dependency in your composer.json
composer require sandeepchowdary7/laratriposo
- publish the vendor config file
php artisan vendor:publish --provider="Sandeepchowdary7\Laratriposo\LaratriposoServiceProvider"
- Add your Triposo API token to the config file located in app/config/triposo.php. I recommend you add this key to your project .env file instead of directly adding it to your config file. You can find your API token at the user settings page (https://www.triposo.com).
TRIPOSO_API_TOKEN=your token here
- Add your Triposo Account ID to the config file located in app/config/triposo.php. I recommend you add this key to your project .env file instead of directly adding it to your config file.
TRIPOSO_ACCOUNT_ID=Your Account ID here
Laravel <= 5.4
- Add the following line to your providers array in your
config/app.php
file
Sandeepchowdary7\Laratriposo\LaratriposoServiceProvider::class,
- Add the following line to your aliases array in your
config/app.php
file
'Triposo' => Sandeepchowdary7\Laratriposo\Facade\LaratriposoFacade::class,
The following functions are available:
Init Triposo rqst
$city = new Triposo();
For city info
$city = new Triposo();
$city->getCity($cityName);
For city Food info
$cityFood = new Triposo();
$cityFood->getCityFood($cityName);
For more information about the REST API go to this link: https://www.triposo.com
License
The MIT License (MIT). Please see License File for more information.