dylandelobel / brawlhalla-api-bundle
Brawlhalla API 的 Symfony 封装
dev-master
2020-03-16 15:56 UTC
Requires
- php: ^7.1.3
- guzzlehttp/guzzle: ^6.5
This package is auto-updated.
Last update: 2024-09-17 02:32:13 UTC
README
Brawlhalla API 的 Symfony 封装
安装
创建 brawlhalla_api_bundle.yaml
,内容如下
brawlhalla_api: api_key: '%env(BRAWL_API_KEY)%'
在 .env.local
中配置开发密钥
###> dylandelobel/brawlhalla-api-bundle ###
BRAWL_API_KEY=xxx
###< dylandelobel/brawlhalla-api-bundle ###
需要此包
composer require dylandelobel/brawlhalla-api-bundle
用法
public function brawl(BrawlhallaClient $brawlhallaClient) { $request = $brawlhallaClient->getClan(1); $json = json_decode($request->getBody()); return new JsonResponse($json); }
贡献
欢迎提交拉取请求。对于重大更改,请先创建一个问题来讨论您想要进行更改的内容。