execute() public method

public execute ( ) : CurrentUserAccountResponse
return Instagram\API\Response\CurrentUserAccountResponse
コード例 #1
0
 /**
  *
  * Get Current User Account
  *
  * @return API\Response\CurrentUserAccountResponse
  * @throws Exception
  */
 public function getCurrentUserAccount()
 {
     if (!$this->isLoggedIn()) {
         throw new InstagramException("You must be logged in to call getCurrentUserAccount().");
     }
     $request = new CurrentUserAccountRequest($this);
     $response = $request->execute();
     if (!$response->isOk()) {
         throw new InstagramException(sprintf("Failed to getCurrentUserAccount: [%s] %s", $response->getStatus(), $response->getMessage()));
     }
     return $response;
 }
コード例 #2
0
 /**
  *
  * Get Current User Account
  *
  * @return API\Response\CurrentUserAccountResponse
  * @throws Exception
  */
 public function getCurrentUserAccount()
 {
     if (!$this->isLoggedIn()) {
         throw new InstagramException("You must be logged in to call getCurrentUserAccount().");
     }
     $request = new CurrentUserAccountRequest($this);
     $response = $request->execute();
     return $response;
 }