Brazilian Table of Food Composition (TACO) API (v0.1.0)

1.0.1 2020-10-05 05:07 UTC

This package is auto-updated.

Last update: 2024-05-05 12:57:40 UTC


README

Maintainer Source Code PHP from Packagist Latest Version Software License Build Quality Score Total Downloads

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)

Highlights

  • 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)

Installation

taco is available via Composer:

"elephpant/taco": "1.0.*"

or run

composer require elephpant/taco

Documentation

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:

Methods

<?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)

Thanks TACO-Food-API for yours simple and intuitives APIs and Documentation

TACO API

Contributing

Please see CONTRIBUTING for details.

Support

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

Credits

License

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