상속: extends AuthenticatedBaseRequest
예제 #1
0
 /**
  *
  * Edit Media
  *
  * @param string|API\Response\Model\FeedItem $mediaId FeedItem or FeedItem Id to Edit
  * @param string $caption Caption for this Media
  * @return API\Response\EditMediaResponse
  * @throws Exception
  */
 public function editMedia($mediaId, $caption = null)
 {
     if (!$this->isLoggedIn()) {
         throw new InstagramException("You must be logged in to call editMedia().");
     }
     if ($mediaId instanceof FeedItem) {
         $mediaId = $mediaId->getPk();
     }
     $request = new EditMediaRequest($this, $mediaId, $caption);
     $response = $request->execute();
     if (!$response->isOk()) {
         throw new InstagramException(sprintf("Failed to editMedia: [%s] %s", $response->getStatus(), $response->getMessage()));
     }
     return $response;
 }
 /**
  *
  * Edit Media
  *
  * @param string|API\Response\Model\FeedItem $mediaId FeedItem or FeedItem Id to Edit
  * @param string $caption Caption for this Media
  * @return API\Response\EditMediaResponse
  * @throws Exception
  */
 public function editMedia($mediaId, $caption = null)
 {
     if (!$this->isLoggedIn()) {
         throw new InstagramException("You must be logged in to call editMedia().");
     }
     if ($mediaId instanceof FeedItem) {
         $mediaId = $mediaId->getPk();
     }
     $request = new EditMediaRequest($this, $mediaId, $caption);
     $response = $request->execute();
     return $response;
 }