dylandelobel/brawlhalla-api-bundle

Brawlhalla API 的 Symfony 封装

安装: 7

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

公开问题: 0

类型:symfony-bundle

dev-master 2020-03-16 15:56 UTC

This package is auto-updated.

Last update: 2024-09-17 02:32:13 UTC


README

SymfonyInsight

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);
    }

贡献

欢迎提交拉取请求。对于重大更改,请先创建一个问题来讨论您想要进行更改的内容。

许可证

MIT