2017 © Pedro Peláez
 

library senscritique-api

image

thcolin/senscritique-api

  • Wednesday, February 8, 2017
  • by thcolin
  • Repository
  • 2 Watchers
  • 8 Stars
  • 36 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

SensCritique API

Build Status Code Climate Test Coverage, (*1)

PHP Library to call basics usage of SensCritique website by curl and dom parsing, (*2)

Installation

Install with composer :, (*3)

composer require thcolin/senscritique-api

Example :

Create a new Client object :, (*4)

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, (*5)

Cool

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

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 ?)

The Versions

08/02 2017

dev-master

9999999-dev

  Sources   Download

The Requires

 

The Development Requires

by Avatar thcolin