Skip to content

Commit

Permalink
Implementing lists
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfzdotnet committed Feb 25, 2014
1 parent b1fdc7d commit f64a18a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
24 changes: 24 additions & 0 deletions examples/account/api/lists.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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);

$sessionToken = new \Tmdb\SessionToken(TMDB_SESSION_TOKEN);
$client->setSessionToken($sessionToken);

$lists = $client->getAccountApi()->getLists(TMDB_ACCOUNT_ID);

var_dump($lists);
8 changes: 5 additions & 3 deletions lib/Tmdb/Api/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ public function getAccount(array $parameters = array(), array $headers = array()
/**
* Get the lists that you have created and marked as a favorite.
*
* @throws NotImplementedException
* @param integer $id
* @param array $parameters
* @param array $headers
* @return mixed
*/
public function getLists()
public function getLists($id, array $parameters = array(), array $headers = array())
{
throw new NotImplementedException(__METHOD__ . ' has not been implemented yet.');
return $this->get('account/' . $id . '/lists', $parameters, $headers);
}

/**
Expand Down

0 comments on commit f64a18a

Please sign in to comment.