thcolin/senscritique-api

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (dev-master) of this package.

dev-master 2017-02-08 09:24 UTC

This package is not auto-updated.

Last update: 2020-01-24 16:09:55 UTC


README

Build Status Code Climate Test Coverage

PHP Library to call basics usage of SensCritique website by curl and dom parsing

Installation

Install with composer :

composer require thcolin/senscritique-api

Example :

Create a new Client object :

use thcolin\SensCritiqueAPI\Client;

$client = new Client();

$user = $client -> getUser('Plug_In_Papa');
$collection = $user -> getCollection();

$movie = $collection[0];
echo $movie -> getTitle();
print_r($movie -> serialize());

$tvshow = $client -> getArtwork(438579);
echo $tvshow -> getStoryline();
print_r($tvshow -> serialize());

$lists = $user -> getLists();
$bestMovies = $lists['bestMovies'];
$movie = $bestMovies[0];

$list = $client -> getList(455329);
$best2016Movie = $list[0];

Check tests/ClientTests for more

Cool

  • Beautiful DynamicArray class which load page dynamically
  • Gorgeous Selection class which get all the pages asynchronously (much faster ❤️ )

TODO

  • Implement Client method searchArtwork, but only "next page" available, not latest
  • Add log (and levels) on API and other Core or src class
  • Add stress tests (how much Artwork can the API handle ?)