thcolin / senscritique-api
Installs: 39
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/thcolin/senscritique-api
Requires
- imangazaliev/didom: ~1.5
- jyggen/curl: ~3.0
Requires (Dev)
- codeclimate/php-test-reporter: ^0.4.3
This package is not auto-updated.
Last update: 2020-01-24 16:09:55 UTC
README
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
DynamicArrayclass which load page dynamically - Gorgeous
Selectionclass which get all the pages asynchronously (much faster ❤️ )
TODO
- Implement
ClientmethodsearchArtwork, but only "next page" available, not latest - Add log (and levels) on
APIand otherCoreorsrcclass - Add stress tests (how much
Artworkcan the API handle ?)