dylandelobel/brawlhalla-api-bundle

Symfony wrapper for Brawlhalla API

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

This package is auto-updated.

Last update: 2024-05-17 01:53:40 UTC


README

SymfonyInsight

Symfony wrapper for Brawlhalla API

Installation

Create brawlhalla_api_bundle.yaml with the following

brawlhalla_api:
  api_key: '%env(BRAWL_API_KEY)%'

In your .env.local the dev key

###> dylandelobel/brawlhalla-api-bundle ###
BRAWL_API_KEY=xxx
###< dylandelobel/brawlhalla-api-bundle ###

Require the package

composer require dylandelobel/brawlhalla-api-bundle

Usage

    public function brawl(BrawlhallaClient $brawlhallaClient)
    {
        $request = $brawlhallaClient->getClan(1);
        $json = json_decode($request->getBody());

        return new JsonResponse($json);
    }

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT