コード例 #1
0
 /**
  * @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;
 }
コード例 #2
0
 /**
  * @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;
 }
コード例 #3
0
ファイル: Get.php プロジェクト: ValentinGot/trakt-api-wrapper
 /**
  * @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;
 }
コード例 #4
0
 /**
  * @param AccessToken $token
  * @param $mediaId
  */
 public function __construct(AccessToken $token, $mediaId)
 {
     parent::__construct();
     $this->id = $mediaId;
     $this->setToken($token);
     $this->setResponseHandler(new SummaryHandler());
 }
コード例 #5
0
ファイル: Get.php プロジェクト: ValentinGot/trakt-api-wrapper
 /**
  * @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;
 }
コード例 #6
0
 /**
  * @param AccessToken $token
  * @param $commentId
  */
 public function __construct(AccessToken $token, $commentId)
 {
     parent::__construct();
     $this->commentId = $commentId;
     $this->setToken($token);
     $this->setResponseHandler(new DefaultDeleteHandler());
 }
コード例 #7
0
 /**
  * @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;
 }
コード例 #8
0
 public function __construct(AccessToken $accessToken, Carbon $startDate = null, $days = null)
 {
     parent::__construct();
     $this->setStartDate($startDate);
     $this->setDays($days);
     $this->setToken($accessToken);
 }
コード例 #9
0
 /**
  * @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;
 }
コード例 #10
0
 /**
  * @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;
 }
コード例 #11
0
 /**
  * @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);
 }
コード例 #12
0
 /**
  * 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;
 }
コード例 #13
0
 /**
  * @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;
 }
コード例 #14
0
 /**
  * @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;
 }
コード例 #15
0
 /**
  * @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());
 }
コード例 #16
0
 /**
  * @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();
     }
 }
コード例 #17
0
 /**
  * @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();
     }
 }
コード例 #18
0
 /**
  * @param AccessToken $token
  * @param Media $media
  * @param $message
  * @param array $sharing
  * @param $venueId
  * @param $venueName
  * @param $appVersion
  * @param $appDate
  */
 public function __construct(AccessToken $token, Media $media, $message = null, array $sharing = [], $venueId = null, $venueName = null, $appVersion = null, $appDate = null)
 {
     parent::__construct();
     $this->media = $media;
     $this->setToken($token);
     $this->setResponseHandler(new CheckinHandler());
     $this->venueId = $venueId;
     $this->appDate = $appDate;
     $this->appVersion = $appVersion;
     $this->message = $message;
     $this->sharing = $sharing;
     $this->venueName = $venueName;
 }
コード例 #19
0
 /**
  * @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());
 }
コード例 #20
0
 /**
  * @param AccessToken $token
  * @param $items
  */
 public function __construct(AccessToken $token, $items)
 {
     parent::__construct();
     $this->setToken($token);
     $this->items = $items;
 }
コード例 #21
0
 /**
  * @param int $mediaId
  */
 public function __construct($mediaId)
 {
     parent::__construct();
     $this->id = $mediaId;
     //        $this->setResponseHandler(new SummaryHandler());
 }
コード例 #22
0
 /**
  * @param int $mediaId
  */
 public function __construct($mediaId)
 {
     parent::__construct();
     $this->id = $mediaId;
 }
コード例 #23
0
 public function __construct(Carbon $startDate = null, $days = null)
 {
     parent::__construct();
     $this->setStartDate($startDate);
     $this->setDays($days);
 }
コード例 #24
0
 /**
  * @param int $commentId
  */
 public function __construct($commentId)
 {
     parent::__construct();
     $this->id = $commentId;
     $this->setResponseHandler(new DefaultDeleteHandler());
 }
コード例 #25
0
 /**
  * @param $username
  * @param AccessToken|null $token
  */
 public function __construct($username, AccessToken $token = null)
 {
     parent::__construct();
     $this->username = $username;
 }
コード例 #26
0
 /**
  * @param int $mediaId
  * @param int $season
  */
 public function __construct($mediaId, $season)
 {
     parent::__construct();
     $this->id = $mediaId;
     $this->season = $season;
 }
コード例 #27
0
 /**
  * @param $request
  * @return mixed
  */
 private function make(AbstractRequest $request)
 {
     return $request->make($this->id, $this->client);
 }
コード例 #28
0
 /**
  * @param int $mediaId
  */
 public function __construct($mediaId)
 {
     parent::__construct();
     $this->id = $mediaId;
     $this->setResponseHandler(new CommentsHandler());
 }
コード例 #29
0
ファイル: Get.php プロジェクト: ValentinGot/trakt-api-wrapper
 public function __construct($commentId)
 {
     parent::__construct();
     $this->id = $commentId;
 }
コード例 #30
0
 /**
  * @param Media $media
  */
 public function __construct(Media $media)
 {
     parent::__construct();
     $this->media = $media;
 }