Skip to content

Commit

Permalink
Adding examples for the remaining two filters.
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfzdotnet committed Apr 10, 2014
1 parent 08971f6 commit 2f65004
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions examples/global_adult_filter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Tmdb PHP API created by Michael Roterman.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package Tmdb
* @author Michael Roterman <[email protected]>
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
require_once '../vendor/autoload.php';
require_once '../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);

$plugin = new \Tmdb\HttpClient\Plugin\AdultFilterPlugin(); // explicitly set this to true to show adult results
$client->getHttpClient()->addSubscriber($plugin);
19 changes: 19 additions & 0 deletions examples/global_language_filter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Tmdb PHP API created by Michael Roterman.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package Tmdb
* @author Michael Roterman <[email protected]>
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
require_once '../vendor/autoload.php';
require_once '../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);

$plugin = new \Tmdb\HttpClient\Plugin\LanguageFilterPlugin('nl');
$client->getHttpClient()->addSubscriber($plugin);

0 comments on commit 2f65004

Please sign in to comment.