2017 © Pedro PelĂĄez
 

library allocine-api-bundle

Allocine API cleint

image

sp/allocine-api-bundle

Allocine API cleint

  • Tuesday, November 5, 2013
  • by shima5
  • Repository
  • 1 Watchers
  • 1 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

SPAllocineApiBundle

Allocine API client, (*1)

Installation

In composer.json:, (*2)

"require": {
    ...
    "sp/allocine-api-bundle": "dev-master"
}

Then run composer update sp/allocine-api-bundle, (*3)

Add the bundle to your AppKernel:, (*4)

public function registerBundles()
{
    $bundles = array(
        ...
        new SP\AllocineBundle\SPAllocineBundle(),
    );
 ```

## Examples

$allocineApi = $this->container->get('allocine.api');, (*5)

// Example 1: search "walking dead" with tvseries filter $results = $allocineApi->search('walking dead', array('tvseries'));, (*6)

// returns an array of results Array ( [feed] => Array ( [page] => 1 [count] => 10 [results] => Array ( [0] => Array ( [type] => tvseries [$] => 3 ), (*7)

            )

        [totalResults] => 3
        [tvseries] => Array
            (
                [0] => Array
                    (
                        [code] => 7330
                        [originalTitle] => The Walking Dead
                        [castingShort] => Array
                            (
                                [creators] => Frank Darabont
                                [actors] => Andrew Lincoln, Steven Yeun, Chandler Riggs, Norman Reedus, David Morrissey
                            )

                        [yearStart] => 2010
                        [statistics] => Array
                            (
                                [pressRating] => 4.42857
                                [userRating] => 4.51771
                            )

                        [poster] => Array
                            (
                                [path] => /medias/nmedia/18/78/35/82/20303823.jpg
                                [href] => http://fr.web.img5.acsta.net/medias/nmedia/18/78/35/82/20303823.jpg
                            )

                        [link] => Array
                            (
                                [0] => Array
                                    (
                                        [rel] => aco:web
                                        [href] => http://www.allocine.fr/series/ficheserie_gen_cserie=7330.html
                                    )

                            )

                    )
                    [1] => Array
                    ...

// Example 2: find movie informations by his name $result = $allocineApi->findMovie('Gravity');, (*8)

// returns Array ( [movie] => Array ( [code] => 178496 [movieType] => Array ( [code] => 4002 [$] => Long-métrage ), (*9)

        [originalTitle] => Gravity
        [title] => Gravity
        [productionYear] => 2013
        [nationality] => Array
            (
                [0] => Array
                    (
                        [code] => 5002
                        [$] => U.S.A.
                    )

                [1] => Array
                    (
                        [code] => 5004
                        [$] => Grande-Bretagne
                    )

            )

        [genre] => Array
            (
                [0] => Array
                    (
                        [code] => 13021
                        [$] => Science fiction
                    )

            )

        [release] => Array
            (
                [releaseDate] => 2013-10-23
            )

        [runtime] => 5400
        ...

```, (*10)

Thanks for @gromez which has provided the query algorithm., (*11)

More informations: http://wiki.gromez.fr/dev/api/allocine_v3, (*12)

The Versions

05/11 2013

dev-master

9999999-dev

Allocine API cleint

  Sources   Download

The Requires

 

by Reinis Grinbergs