PHP code example of devmachine / guzzle-rottentomatoes-client

1. Go to this page and download the library: Download devmachine/guzzle-rottentomatoes-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

devmachine / guzzle-rottentomatoes-client example snippets


use Devmachine\Guzzle\RottenTomatoes\RottenTomatoesClient;

$client = RottenTomatoesClient::factory('<api-key>');
$result = $client->movies(['q' => 'Terminator 3']);

var_dump($result['movies']);

use Devmachine\Guzzle\RottenTomatoes\RottenTomatoesClient;

$client = RottenTomatoesClient::factory('<api-key>');

// Movies
$client->movies();
$client->moviesBoxOffice();
$client->moviesOpening();
$client->moviesInTheaters();
$client->moviesUpcoming();

// Individual movie
$client->movie();
$client->movieCast();
$client->movieClips();
$client->movieReviews();
$client->movieSimilar();
$client->movieAlias();

// DVDs
$client->dvdsTopRentals();
$client->dvdsCurrentReleases();
$client->dvdsNewReleases();
$client->dvdsUpcoming();

// Lists
$client->lists();
$client->listsMovies();
$client->listsDVDs();