With TACO it is possible to obtain nutritional data from a wide collection of foods through the API of the same name. Its use is very simple.
Com o TACO é possível obter dados nutricionais de uma vasta coleção de alimentos através da API de mesmo nome. Seu uso é muito simples.
NOTE: This component consumes the TACO API (Brazilian Food Composition Table) (https://taco-food-api.herokuapp.com)
NOTA: Este componente consome a API TACO (Tabela Brasileira de Composição de Alimentos) (https://taco-food-api.herokuapp.com)
- Extremaly Easy
- Supports several Currencies
- Flexible
- Implements PSR7 (Message Interface)
- Composer ready and PSR-2 compliant (Pronto para o composer e compatível com PSR-2)
taco is available via Composer:
"elephpant/taco": "1.0.*"
or run
composer require elephpant/taco
For details on how to use, see a sample folder in the component directory. In it you will have an example of use for each class. It works like this:
Para mais detalhes sobre como usar, veja uma pasta de exemplo no diretório do componente. Nela terá um exemplo de uso para cada classe. Ele funciona assim:
<?php
require __DIR__ . "/vendor/autoload.php";
use ElePHPant\Taco;
$taco = new Taco();
/* List of all Categories of Food */
$taco->categories();
/* Only one Category - Insert in the ID of the Category that you want bring */
$category = $taco->category(1);
/* Foods From Category - Insert in the the ID of the Category then see all foods */
$foodFromCategory = $taco->foodFromCategory(1);
/* Only One Food - Insert in the param the ID of the Food that you want bring */
$food = $taco->food(2);
/* Provide the timeout to set it (in seconds) */
$timeout = $taco->setTimeout(3)
Please see CONTRIBUTING for details.
Security: If you discover any security related issues, please email sergiodanilojr@hotmail.com instead of using the issue tracker.
Se você descobrir algum problema relacionado à segurança, envie um e-mail para sergiodanilojr@hotmail.com em vez de usar o rastreador de problemas.
Thank you
- Sérgio Danilo Jr. (Developer)
- All Contributors
The MIT License (MIT). Please see License File for more information.