Send GET request to API resource

@param string $resource
@param array $params
@return array
482224
protected function sendGetRequest($resource, $params = [])
    {
        $response = $this->sendRequest(
            'GET',
            $this->getServiceUrl($resource, $params),
            [
                'headers' => [
                    'Accept' => 'application/x-yametrika+json',
                    'Content-Type' => 'application/x-yametrika+json',
                    'Authorization' => 'OAuth ' . $this->getAccessToken(),
                ]
            ]
        );

        $decodedResponseBody = $this->getDecodedBody($response->getBody());

        if (isset($decodedResponseBody['links']) && isset($decodedResponseBody['links']['next'])) {
            $url = $decodedResponseBody['links']['next'];
            unset($decodedResponseBody['rows']);
            unset($decodedResponseBody['links']);
            return $this->getNextPartOfList($url, $decodedResponseBody);
        }
        return $decodedResponseBody;
    }
1173181
public function get($url, array $params = [])
    {
       $queryString = '?' . http_build_query($params);

       $url = $url . $queryString;

       $request = new Request(
            $url,
            'GET'
        );

        return $this->send($request);
    }
826071
def make_request(self, resource, params=None):
        
        if params is None:
            params = {}

        url = self.request_url(resource)
        params['format'] = 'json'

        r = self.session.get(url=url, params=params)

        r.raise_for_status()

        return r
88245
private function buildUrl($resource, $args)
    {
        //Merge args(apiKey, Format, noJsonCallback)
        $args = array_merge($args, $this->args);
        $query = http_build_query($args);

        $url = $this->url;
        $url .= $resource . '?' . $query;

        return $url;
    }
1300997
public function get($resource = null, $data = array())
    {
        return $this->call($resource, AnHttpRequest::GET, $data);
    }
668601
public function request($params)
  {
    $query = array_merge($params, [
      'key' => $this->key
    ]);

    try {

      $response = $this->client->get(self::API_ENDPOINT, [
        'query' => $query
      ]);

    } catch (ClientException $exception) {

      return collect([]);

    }

    $results = json_decode($response->getBody(), true);

    $output = [];

    for($i = 0; $i < count($results['itemListElement']); $i++) {
      $output[] = new SearchResult($results['itemListElement'][$i]);
    }

    return collect($output);
  }
710549
public function reverse($resource, array $params = [])
    {
        // search in all routes
        if($key = array_search($resource, $this->routes)) {
            $route = $this->routes[$key];
            $route->params = $params;
            return $route;
        }
    }
77084
public static function getResource($path, $resource = 'Resource')
    {
        $response = self::connection()->get(self::$api_path . $path);

        return self::mapResource($resource, $response);
    }
1203640
public function findAllByResourceAndNames($resource, array $params)
    {
        $where = $this->getWhere(['resource' => $resource]);
        $model = $this->makeModel()->getModel()->widgetParams()->getModel()->newQuery();
        return $model->where($where)->whereIn('name', $params)->get()->toArray();
    }
1230022
public function getRedirectParameters($resource = null)
    {
        $redirect = $this->parameters->get('redirect');

        if ($this->areParametersIntentionallyEmptyArray($redirect)) {
            return [];
        }

        if (!is_array($redirect)) {
            $redirect = ['parameters' => []];
        }

        $parameters = $redirect['parameters'] ?? [];
        $parameters = $this->addExtraRedirectParameters($parameters);

        if (null !== $resource) {
            $parameters = $this->parseResourceValues($parameters, $resource);
        }

        return $parameters;
    }
315019
public function sendRawRequest(array $params)
    {
        $rawResponse = $this->performRequest($params);
        $result = $this->parseResponse($rawResponse);

        return $result;
    }
222564
public function requestGet($endpoint, $params = array(), $headers = array())
    {
        return $this->getClient()->get($endpoint, $params, $headers);
    }
268903
protected function _request(array $params)
    {
        $client = new Client();

        if ( $params['type'] == 'get' ) {
            $url = $this->url . '/api/' . $this->apiKey . '/' . $params['uri'] . '?' . http_build_query($params['data']);
            $options = [];
            if ( $this->httpAuthUsername && $this->httpAuthPassword ) {
                $options['auth'] = [
                    $this->httpAuthUsername,
                    $this->httpAuthPassword
                ];
            }

            return $client->get($url, $options);
        }
    }
877949
public function get($uri, $parameters = array())
    {
        return $this->request(self::METHOD_GET, $this->getUrl($uri), $parameters);
    }
135775
private function apiGet($url, $params)
    {
        $url = $url . (strpos($url, '?') === false ? '?' : '') . http_build_query($params);

        try {
            $response = $this->httpClient->request('GET', $url, [
                'headers' => [
                    'user-key' => $this->igdbKey,
                    'Accept' => 'application/json'
                ]
            ]);
        } catch (RequestException $exception) {
            if ($response = $exception->getResponse()) {
                throw new \Exception($exception);
            }
            throw new \Exception($exception);
        } catch (Exception $exception) {
            throw new \Exception($exception);
        }

        return $response->getBody();
    }
782631
public function get($url, $params = null) {
    $this->params = $params;
    $this->method = 'GET';
    $this->url = $url;

    return $this->request();
  }
981664
def get(self, resource, params=None, headers=None):
        
        return self.do(resource, 'GET', params=params, headers=headers)