示例#1
0
文件: Api.php 项目: afosto/api-client
 /**
  * Run a request on the api
  * @param $queryType
  * @return mixed
  * @throws ApiException
  * @throws RateLimitException
  */
 public function request($queryType)
 {
     //Prepare the request
     $this->_request = new Request(ApiHelper::getMethod($queryType), $this->_owner->getRoute() . '/' . $this->_getUri($queryType));
     $this->beforeRequest($queryType);
     //Run the request
     $this->_response = App::getInstance()->getClient()->send($this->_request, $this->_options);
     //Do administration
     $this->afterRequest($queryType);
     return $this->_result;
 }