Developed with love by KnpLabs Hire us for your project!
0

TobiassjostenTheTVDBBundle

by tobiassjosten

TobiassjostenTheTVDBBundle

This bundle wraps the TheTVDB API client in a Symfony2 service, making it easy to with integrate the excellent TheTVDB.com database in your Symfony application.

TheTVDB.com is an open database with a lot of TV related data and graphics, added by its members. Like a niche Wikipedia with an API! You need to register for an API key before you can use the service.

TobiassjostenTheTVDBBundle was initially developed for use in Smartburk.se.

Build Status

Usage

1. Download the bundle using Composer

Add TobiassjostenTheTVDBBundle in your composer.json:

{
    "require": {
        "tobiassjosten/thetvdb-bundle": "1.0.*"
    }
}

Now tell Composer to download the bundle by running the command:

$ php composer.phar update tobiassjosten/thetvdb-bundle

Composer will install the bundle to your project's vendor/tobiassjosten directory.

2. Enable the bundle

Enable the bundle in the kernel (app/AppKernel.php):

public function registerBundles()
{
    $bundles = array(
        // ...
        new Tobiassjosten\TheTVDBBundle\TobiassjostenTheTVDBBundle(),
    );
}

3. Configure the API client

Add your API key to your application's parameters (app/config/parameters.yml):

parameters:
    # ...
    thetvdb_api_key: ABCDEF123456

4. Fetch the service

Use the dependency injection container to retrieve the service:

$api = $container->get('thetvdb');

See the library for how to use the actual API.

License

This bundle is under the MIT license. See the complete license in the bundle:

Resources/meta/LICENSE
Copyright (c) Tobias Sjösten <tobias@tobiassjosten.net>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.