execute() 공개 메소드

public execute ( ) : Instagram\API\Response\BulkDeleteCommentsMediaResponse
리턴 Instagram\API\Response\BulkDeleteCommentsMediaResponse
예제 #1
0
 /**
  *
  * Delete Media Comments
  *
  * @param string|API\Response\Model\FeedItem $mediaId FeedItem or FeedItem Id to Delete Comments from
  * @param array $commentIds Array of Comment Ids to Delete
  * @return API\Response\BulkDeleteCommentsMediaResponse
  * @throws Exception
  */
 public function deleteCommentsFromMedia($mediaId, $commentIds)
 {
     if (!$this->isLoggedIn()) {
         throw new InstagramException("You must be logged in to call deleteCommentsFromMedia().");
     }
     if ($mediaId instanceof FeedItem) {
         $mediaId = $mediaId->getPk();
     }
     $request = new BulkDeleteCommentsMediaRequest($this, $mediaId, $commentIds);
     $response = $request->execute();
     if (!$response->isOk()) {
         throw new InstagramException(sprintf("Failed to deleteCommentsFromMedia: [%s] %s", $response->getStatus(), $response->getMessage()));
     }
     return $response;
 }
 /**
  *
  * Delete Media Comments
  *
  * @param string|API\Response\Model\FeedItem $mediaId FeedItem or FeedItem Id to Delete Comments from
  * @param array $commentIds Array of Comment Ids to Delete
  * @return API\Response\BulkDeleteCommentsMediaResponse
  * @throws Exception
  */
 public function deleteCommentsFromMedia($mediaId, $commentIds)
 {
     if (!$this->isLoggedIn()) {
         throw new InstagramException("You must be logged in to call deleteCommentsFromMedia().");
     }
     if ($mediaId instanceof FeedItem) {
         $mediaId = $mediaId->getPk();
     }
     $request = new BulkDeleteCommentsMediaRequest($this, $mediaId, $commentIds);
     $response = $request->execute();
     return $response;
 }