作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param $request
* @return mixed
*/
private function make(AbstractRequest $request)
{
return $request->make($this->id, $this->client);
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param int $mediaId
* @param int $season
* @param int $episode
*/
public function __construct($mediaId, $season, $episode)
{
parent::__construct();
$this->id = $mediaId;
$this->episode = $episode;
$this->season = $season;
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param AccessToken $token
* @param $username
* @param array $list
*/
public function __construct(AccessToken $token, $username, $list)
{
parent::__construct();
$this->setToken($token);
$this->list = $list;
$this->username = $username;
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param string $username
* @param null $listId
* @param AccessToken|null $token
*/
public function __construct($username, $listId = null, AccessToken $token = null)
{
parent::__construct();
$this->setToken($token);
$this->username = $username;
$this->listId = $listId;
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param AccessToken $token
* @param $type
* @param null $rating
*/
public function __construct(AccessToken $token, $type, $rating = null)
{
parent::__construct();
$this->setToken($token);
$this->rating = $rating;
$this->type = $type;
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param AccessToken $token
* @param $commentId
*/
public function __construct(AccessToken $token, $commentId)
{
parent::__construct();
$this->commentId = $commentId;
$this->setToken($token);
$this->setResponseHandler(new DefaultDeleteHandler());
}
作者:kduma-archiv
项目:trakt-api-wrappe
/**
* @param AccessToken $token
* @param $type
* @param $id
*/
public function __construct(AccessToken $token, $type, $id = null)
{
parent::__construct();
$this->setToken($token);
$this->id = $id;
$this->type = $type;
}
作者:ValentinGo
项目:trakt-api-wrappe
public function __construct(AccessToken $accessToken, Carbon $startDate = null, $days = null)
{
parent::__construct();
$this->setStartDate($startDate);
$this->setDays($days);
$this->setToken($accessToken);
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param AccessToken $token
* @param $username
* @param $type
*/
public function __construct($username, $type, AccessToken $token = null)
{
parent::__construct();
$this->setToken($token);
$this->type = $type;
$this->username = $username;
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param AccessToken $token
* @param $section
* @param $type
*/
public function __construct(AccessToken $token, $section, $type)
{
parent::__construct();
$this->setToken($token);
$this->section = $section;
$this->type = $type;
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param AccessToken $accessToken
* @param Carbon $startDate
* @param $days
*/
public function __construct(AccessToken $accessToken, Carbon $startDate = null, $days = null)
{
parent::__construct();
$this->setDays($days);
$this->setStartDate($startDate);
// $this->setResponseHandler(new ShowsResponse());
$this->setToken($accessToken);
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* Formats the uri, it replaces the parameters with the values it has retrieved from
* the request object.
*
* @param $values
* @return mixed
*/
private function formatUri($values)
{
$uri = $this->request->getUri();
foreach ($values as $parameter => $value) {
$uri = str_replace(":" . $parameter, $value, $uri);
}
return $uri;
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param AccessToken $token
* @param $username
* @param $listId
* @param $itemsToRemove
*/
public function __construct(AccessToken $token, $username, $listId, $itemsToRemove)
{
parent::__construct();
$this->setToken($token);
$this->itemsToRemove = $itemsToRemove;
$this->listId = $listId;
$this->username = $username;
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param AccessToken $token
* @param $username
* @param $id
* @param array $updates
*/
public function __construct(AccessToken $token, $username, $id, $updates)
{
parent::__construct();
$this->setToken($token);
$this->id = $id;
$this->username = $username;
$this->updates = $updates;
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param string $idType
* @param $mediaId
*/
public function __construct($idType, $mediaId, AccessToken $token = null)
{
parent::__construct();
$this->setQueryParams(["id_type" => $idType, "id" => $mediaId]);
if ($token !== null) {
$this->setToken($token);
}
$this->setResponseHandler(new SearchHandler());
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param Media $media
* @param $comment
* @param $spoiler
* @throws CommentTooShortException
*/
public function __construct(Media $media, $comment, $spoiler = false)
{
parent::__construct();
$this->comment = $comment;
$this->media = $media;
$this->spoiler = $spoiler;
if ($this->commentIsNotAllowedSize()) {
throw new CommentTooShortException();
}
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param int $commentId
* @param string $comment
* @param bool $spoiler
* @throws CommentTooShortException
*/
public function __construct($commentId, $comment, $spoiler)
{
parent::__construct();
$this->id = $commentId;
$this->comment = $comment;
$this->spoiler = $spoiler;
$this->setResponseHandler(new CommentHandler());
if ($this->commentIsNotAllowedSize()) {
throw new CommentTooShortException();
}
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param string $query
* @param string $type
* @param int $year
* @param AccessToken $token
*/
public function __construct($query, $type = null, $year = null, AccessToken $token = null)
{
parent::__construct();
$this->query = $query;
$this->type = $type;
$this->year = $year;
if ($token !== null) {
$this->setToken($token);
}
$queryParams = $this->makeQueryParams();
$this->setQueryParams($queryParams);
$this->setResponseHandler(new SearchHandler());
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param AccessToken $token
* @param $items
*/
public function __construct(AccessToken $token, $items)
{
parent::__construct();
$this->setToken($token);
$this->items = $items;
}
作者:ValentinGo
项目:trakt-api-wrappe
/**
* @param int $mediaId
*/
public function __construct($mediaId)
{
parent::__construct();
$this->id = $mediaId;
}