diff --git a/examples/authentication/api/get-guest-session.php b/examples/authentication/api/get-guest-session.php new file mode 100644 index 00000000..8712ffb5 --- /dev/null +++ b/examples/authentication/api/get-guest-session.php @@ -0,0 +1,21 @@ + + * @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); \ No newline at end of file diff --git a/lib/Tmdb/Api/Authentication.php b/lib/Tmdb/Api/Authentication.php index d6738de0..94ac0cb5 100644 --- a/lib/Tmdb/Api/Authentication.php +++ b/lib/Tmdb/Api/Authentication.php @@ -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'); } }