Blitzr Official PHP Bundle
A PHP API client bundle for the Blitzr API., (*1)
To use this bundle you will need an API key, you can request it at : https://blitzr.io., (*2)
Documentation
This service implements all the methods from the official Blitzr PHP client. Also you can use the PHP client documentation as a reference for this bundle., (*3)
You can also refer to the official Blitzr API reference to have more informations., (*4)
Installation
First add BlitzrApiClientBundle to your composer requirements., (*5)
$ composer require blitzr/api-client-bundle
Then enable the bundle in the Kernel., (*6)
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Blitzr\ApiClientBundle\BlitzrApiClientBundle(),
// ...
);
}
Add the API key to your configuration., (*7)
// app/config/config.yml
...
# BlitzrApiClientBundle
blitzr_api_client:
api_key: "your_api_key"
That's all !, (*8)
Getting Started
This bundle provides you a service, let's take an example of how to get an Artist or a Tag., (*9)
// Get the service
$blitzrClient = $this->get('blitzr_api_client.client');
// Request the artist
$artist = $blitzrClient->getArtist('year-of-no-light');
// Request a tag
$tag = $blitzrClient->getTag('rock');