Skip to content
A full wrapper for the YTS API.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
src
tests
.editorconfig
.gitattributes
.gitignore
.styleci.yml
.travis.yml
CHANGELOG.md
LICENSE.md
README.md
composer.json
phpcs.xml.dist
phpunit.xml.dist

README.md

yts

Latest Version on Packagist Software License Build Status Style CI Code Coverage Total Downloads

A full wrapper for the YTS API.

Install

Via Composer

$ composer require pxgamer/yts

Usage

List Movies

Returns a Collection instance containing Movie instances.

Movies::list([
    'quality'         => Movies::QUALITY_ALL, // A quality constant
    'query_term'      => 0,                   // A query string, or 0 to ignore
    'page'            => 1,                   // An integer page number
    'minimum_rating'  => 0,                   // The minimum movie rating
    'genre'           => '',                  // A string containing the genre
    'sort_by'         => 'date-added',        // The sort-by order
    'order_by'        => 'desc',              // The direction to order by
    'with_rt_ratings' => false,               // Returns the list with Rotten Tomatoes ratings
]);

Movie Details

Returns a Movie instance.

Movies::details([
    'movie_id'    => null,  // The ID of the movie to retrieve
    'with_images' => false, // Return with image URLs
    'with_cast'   => false, // Return with information about the cast
]);

Movie Suggestions

Returns a Collection instance containing 0 to 4 Movie instances.

Movies::suggestions([
    'movie_id' => null, // The ID of the movie to retrieve suggestions for
]);

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email security@pxgamer.xyz instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.