상속: extends AuthenticatedBaseRequest
예제 #1
0
 /**
  *
  * Unblock User
  *
  * @param string|API\Response\Model\User $userId User or User Id to Unblock
  * @return API\Response\UnblockFriendshipResponse
  * @throws Exception
  */
 public function unblockUser($userId)
 {
     if (!$this->isLoggedIn()) {
         throw new InstagramException("You must be logged in to call unblockUser().");
     }
     if ($userId instanceof User) {
         $userId = $userId->getPk();
     }
     $request = new UnblockFriendshipRequest($this, $userId);
     $response = $request->execute();
     if (!$response->isOk()) {
         throw new InstagramException(sprintf("Failed to unblockUser: [%s] %s", $response->getStatus(), $response->getMessage()));
     }
     return $response;
 }
 /**
  *
  * Unblock User
  *
  * @param string|API\Response\Model\User $userId User or User Id to Unblock
  * @return API\Response\UnblockFriendshipResponse
  * @throws Exception
  */
 public function unblockUser($userId)
 {
     if (!$this->isLoggedIn()) {
         throw new InstagramException("You must be logged in to call unblockUser().");
     }
     if ($userId instanceof User) {
         $userId = $userId->getPk();
     }
     $request = new UnblockFriendshipRequest($this, $userId);
     $response = $request->execute();
     return $response;
 }