elephpant / taco
巴西食品成分表(TACO)API(v0.1.0)
Requires
- php: ^7.1
- ext-curl: *
- ext-json: *
- ext-xml: *
- guzzlehttp/guzzle: ^7.0
This package is auto-updated.
Last update: 2024-09-05 13:39:19 UTC
README
使用TACO,可以通过同名API获取大量食品的营养数据。其使用非常简单。
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.
注意:此组件消耗TACO API(巴西食品成分表)(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)
亮点
- 极其简单
- 支持多种货币
- 灵活
- 实现PSR7(消息接口)
- Composer准备就绪且PSR-2兼容(Pronto para o composer e compatível com PSR-2)
安装
taco可通过Composer获得
"elephpant/taco": "1.0.*"
或运行
composer require elephpant/taco
文档
有关如何使用的详细信息,请参阅组件目录中的示例文件夹。其中包含了每个类的使用示例。它的工作方式如下
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)
感谢TACO-Food-API提供的简单直观的API和文档
贡献
请参阅CONTRIBUTING以获取详细信息。
支持
安全:如果您发现任何与安全相关的问题,请通过电子邮件sergiodanilojr@hotmail.com联系,而不是使用问题跟踪器。
Se você descobrir algum problema relacionado à segurança, envie um e-mail para sergiodanilojr@hotmail.com em vez de usar o rastreador de problemas.
感谢
致谢
- Sérgio Danilo Jr.(开发者)
- 所有贡献者
许可
MIT许可(MIT)。有关更多信息,请参阅许可文件。