public execute ( ) : Instagram\API\Response\BulkDeleteCommentsMediaResponse | ||
return | Instagram\API\Response\BulkDeleteCommentsMediaResponse |
/** * * 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; }