nickdaelemans / bring-sdk
与Bring购物清单连接的SDK包
dev-main
2021-12-13 20:49 UTC
Requires
- ext-json: *
- guzzlehttp/guzzle: 7.4.x-dev
This package is auto-updated.
Last update: 2024-09-14 02:36:03 UTC
README
原因
这是一个个人项目,我想使用一个智能按钮来通过按按钮将物品添加到我的Bring购物清单中。
在创建时,没有可用的集成,所以我决定自己编写。我基于https://github.com/foxriver76/node-bring-api仓库。
如何安装
只需运行composer require nickdaelemans/bring-sdk
如何使用
示例使用
// Initiate the BringApi class with your e-mailaddress and password.
$bring = new BringApi('info@example.com', 'PASSWORD');
$bring->login();
// Get all lists for the logged in user.
$lists = $bring->getLists();
// Get all items from a list.
$list_items = $bring->getItemsFromList('536bb7f3-e3f7-4b7f-af05-253cc47b1dd5');
// Add item to the list using the list's uuid.
$bring->addItem('536bb7f3-e3f7-4b7f-af05-253cc47b1dd5', 'Item name');