コード例 #1
0
<?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 <*****@*****.**>
 * @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, ['session_token' => new \Tmdb\SessionToken(TMDB_SESSION_TOKEN)]);
/**
 * @var \Tmdb\Repository\AccountRepository $accountRepository
 */
$accountRepository = new \Tmdb\Repository\AccountRepository($client);
$lists = $accountRepository->getMovieWatchlist(TMDB_ACCOUNT_ID);
var_dump($lists);
コード例 #2
0
<?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 <*****@*****.**>
 * @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, ['session_token' => new \Tmdb\SessionToken(TMDB_SESSION_TOKEN)]);
/**
 * @var \Tmdb\Repository\AccountRepository $accountRepository
 */
$accountRepository = new \Tmdb\Repository\AccountRepository($client);
$lists = $accountRepository->favorite(TMDB_ACCOUNT_ID, 1973, true, 'tv');
var_dump($lists);
コード例 #3
0
ファイル: favorite_movie_add.php プロジェクト: n10ty/api
<?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 <*****@*****.**>
 * @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);
/**
 * @var \Tmdb\Repository\AccountRepository $accountRepository
 */
$accountRepository = new \Tmdb\Repository\AccountRepository($client);
$lists = $accountRepository->favorite(TMDB_ACCOUNT_ID, 150);
var_dump($lists);
コード例 #4
0
<?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 <*****@*****.**>
 * @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, ['session_token' => new \Tmdb\SessionToken(TMDB_SESSION_TOKEN)]);
/**
 * @var \Tmdb\Repository\AccountRepository $accountRepository
 */
$accountRepository = new \Tmdb\Repository\AccountRepository($client);
$lists = $accountRepository->getFavoriteTvShows(TMDB_ACCOUNT_ID);
var_dump($lists);
コード例 #5
0
ファイル: rated_tv.php プロジェクト: n10ty/api
<?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 <*****@*****.**>
 * @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);
/**
 * @var \Tmdb\Repository\AccountRepository $accountRepository
 */
$accountRepository = new \Tmdb\Repository\AccountRepository($client);
$lists = $accountRepository->getRatedTvShows(TMDB_ACCOUNT_ID);
var_dump($lists);
コード例 #6
0
ファイル: lists.php プロジェクト: n10ty/api
<?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 <*****@*****.**>
 * @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);
/**
 * @var \Tmdb\Repository\AccountRepository $accountRepository
 */
$accountRepository = new \Tmdb\Repository\AccountRepository($client);
$lists = $accountRepository->getLists(TMDB_ACCOUNT_ID);
var_dump($lists);
コード例 #7
0
ファイル: rated_movies.php プロジェクト: n10ty/api
<?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 <*****@*****.**>
 * @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);
/**
 * @var \Tmdb\Repository\AccountRepository $accountRepository
 */
$accountRepository = new \Tmdb\Repository\AccountRepository($client);
$lists = $accountRepository->getRatedMovies(TMDB_ACCOUNT_ID);
var_dump($lists);
コード例 #8
0
ファイル: watchlist_tv_add.php プロジェクト: n10ty/api
<?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 <*****@*****.**>
 * @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);
/**
 * @var \Tmdb\Repository\AccountRepository $accountRepository
 */
$accountRepository = new \Tmdb\Repository\AccountRepository($client);
$lists = $accountRepository->watchlist(TMDB_ACCOUNT_ID, 1973, true, 'tv');
var_dump($lists);
コード例 #9
0
ファイル: account.php プロジェクト: n10ty/api
<?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 <*****@*****.**>
 * @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);
$accountRepository = new \Tmdb\Repository\AccountRepository($client);
$account = $accountRepository->getAccount();
var_dump($account);
コード例 #10
0
ファイル: favorite_movie.php プロジェクト: n10ty/api
<?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 <*****@*****.**>
 * @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);
/**
 * @var \Tmdb\Repository\AccountRepository $accountRepository
 */
$accountRepository = new \Tmdb\Repository\AccountRepository($client);
$lists = $accountRepository->getFavoriteMovies(TMDB_ACCOUNT_ID);
var_dump($lists);
コード例 #11
0
ファイル: watchlist_movie_add.php プロジェクト: n10ty/api
<?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 <*****@*****.**>
 * @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);
/**
 * @var \Tmdb\Repository\AccountRepository $accountRepository
 */
$accountRepository = new \Tmdb\Repository\AccountRepository($client);
$lists = $accountRepository->watchlist(TMDB_ACCOUNT_ID, 49047);
var_dump($lists);