original_string: protected function getApiResults($apiPath, $raw = false)
      {
          $apiUrl = $this->apiUrl . $apiPath;
  
          $response = Http::sendHttpRequest($apiUrl, 1000, null, null, 5, false, false, true, 'GET', $this->username, $this->password);
  
          $httpStatus = $response['status'];
          $response = $response['data'];
  
          if ($httpStatus == 401) {
              throw new AuthenticationFailedException();
          } elseif ($httpStatus != 200) {
              throw new Exception('Error while getting API results', $httpStatus);
          }
  
          return $raw ? $response : json_decode($response);
      }
code: protected function getApiResults($apiPath, $raw = false)
      {
          $apiUrl = $this->apiUrl . $apiPath;
  
          $response = Http::sendHttpRequest($apiUrl, 1000, null, null, 5, false, false, true, 'GET', $this->username, $this->password);
  
          $httpStatus = $response['status'];
          $response = $response['data'];
  
          if ($httpStatus == 401) {
              throw new AuthenticationFailedException();
          } elseif ($httpStatus != 200) {
              throw new Exception('Error while getting API results', $httpStatus);
          }
  
          return $raw ? $response : json_decode($response);
      }
code_tokens: protected function getApiResults ( $ apiPath , $ raw = false ) { $ apiUrl = $ this -> apiUrl . $ apiPath ; $ response = Http :: sendHttpRequest ( $ apiUrl , 1000 , null , null , 5 , false , false , true , 'GET' , $ this -> username , $ this -> password ) ; $ httpStatus = $ response [ 'status' ] ; $ response = $ response [ 'data' ] ; if ( $ httpStatus == 401 ) { throw new AuthenticationFailedException ( ) ; } elseif ( $ httpStatus != 200 ) { throw new Exception ( 'Error while getting API results' , $ httpStatus ) ; } return $ raw ? $ response : json_decode ( $ response ) ; }
docstring: Returns response for API request with given path
  
  @param $apiPath
  @param bool $raw
  @return mixed
  @throws AuthenticationFailedException
  @throws Exception
docstring_tokens: Returns response for API request with given path