monbillet / api-client
允许您快速轻松地使用 monbillet API
1.0.2
2022-10-19 13:25 UTC
Requires
- php: ^7.1||^8.0
- ext-curl: *
README
由 monbillet.ch 提供
文档
请参阅我们的 文档 获取更多信息。
安装
使用 Composer 安装库。
$ composer require monbillet/api-client
用法
use Monbillet\ApiClient; $token = ''; // your API key $cache_path = ''; // path to a writable directory to store the cache $cache_expire_minutes = 10; $client = new ApiClient($token, $cache_path, $cache_expire_minutes); $events = $client->getEvents(); $event_groups = $client->getEventGroups(); $event_id = ''; // the id or unique name of an event $event = $client->getEvent($event_id); $group_id = ''; // the id or unique name of a group $event_group = $client->getGroup($group_id);
运行示例
- 将您的 API 密钥写入 example/.env.sample 文件
- 运行
composer dump-autoload
- 运行
composer run-script example
访问并测试 localhost:9000 注意:这个网络服务器是为了辅助应用程序开发而设计的。它不应该在公共网络上使用。