execute() публичный Метод

public execute ( ) : CurrentUserAccountResponse
Результат 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;
 }
 /**
  *
  * 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;
 }