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

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

Latest Version on Packagist Software License Total Downloads

Simple and extensible Triposo API PHP Client with Laravel Facade and ServiceProvider based on Guzzle 6 Currently it supports only userless endpoint requests.

Installation

  1. Add the package as a dependency in your composer.json
composer require sandeepchowdary7/laratriposo
  1. publish the vendor config file
php artisan vendor:publish --provider="Sandeepchowdary7\Laratriposo\LaratriposoServiceProvider"
  1. 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
  1. 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

  1. Add the following line to your providers array in your config/app.php file
Sandeepchowdary7\Laratriposo\LaratriposoServiceProvider::class,
  1. 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.