/**
*
* Unfollow User
*
* @param string|API\Response\Model\User $userId User or User Id to Unfollow
* @return API\Response\DestroyFriendshipResponse
* @throws Exception
*/
public function unfollowUser($userId)
{
if (!$this->isLoggedIn()) {
throw new InstagramException("You must be logged in to call unfollowUser().");
}
if ($userId instanceof User) {
$userId = $userId->getPk();
}
$request = new DestroyFriendshipRequest($this, $userId);
$response = $request->execute();
if (!$response->isOk()) {
throw new InstagramException(sprintf("Failed to unfollowUser: [%s] %s", $response->getStatus(), $response->getMessage()));
}
return $response;
}