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