/**
  * Dispatch the request for this operation and process the response. Allows you to
  * modify the request before it is sent.
  *
  * @return \GithubService\Model\GistStarred
  * @param \Amp\Artax\Request $request The request to be processed
  */
 public function dispatch(\Amp\Artax\Request $request)
 {
     $response = $this->api->execute($request, $this);
     $this->response = $response;
     $instance = $this->api->instantiateResult($response, $this);
     return $instance;
 }
 /**
  * Dispatch the request for this operation and process the response. Allows you to
  * modify the request before it is sent.
  *
  * @return \GithubService\Model\OauthAccess
  * @param \Amp\Artax\Request $request The request to be processed
  */
 public function dispatch(\Amp\Artax\Request $request)
 {
     $response = $this->api->execute($request, $this);
     $this->response = $response;
     $instance = \GithubService\Model\OauthAccess::createFromResponse($response, $this);
     return $instance;
 }
Ejemplo n.º 3
0
 /**
  * @param Request $request
  * @param \ArtaxServiceBuilder\Operation $operation
  * @return Response
  * @throws
  */
 public function execute(Request $request, \ArtaxServiceBuilder\Operation $operation)
 {
     $rateLimitException = $this->checkRateLimitException();
     if ($rateLimitException) {
         throw $rateLimitException;
     }
     $response = parent::execute($request, $operation);
     $originalResponse = $operation->getOriginalResponse();
     $newRateLimit = \GithubService\RateLimit::createFromResponse($originalResponse);
     if ($newRateLimit != null) {
         $this->rateLimit = $newRateLimit;
     }
     return $response;
 }
 /**
  * Dispatch the request for this operation and process the response. Allows you to
  * modify the request before it is sent.
  *
  * @return mixed
  * @param \Amp\Artax\Request $request The request to be processed
  */
 public function dispatch(\Amp\Artax\Request $request)
 {
     $response = $this->api->execute($request, $this);
     $this->response = $response;
     return $response->getBody();
 }