Skip to content

Commit

Permalink
Adding guest_session
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfzdotnet committed Feb 24, 2014
1 parent 2cdb1a7 commit b8f2174
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions examples/authentication/api/get-guest-session.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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 = $client->getAuthenticationApi()->getNewGuestSession();

var_dump($sessionToken);
2 changes: 1 addition & 1 deletion lib/Tmdb/Api/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ public function getNewSession($requestToken)
*/
public function getNewGuestSession()
{
throw new NotImplementedException(__METHOD__ . ' has not been implemented yet.');
return $this->get('authentication/guest_session/new');
}
}

0 comments on commit b8f2174

Please sign in to comment.