original_string: protected function call(array $params)
      {
          $defaultParams = [
              'key'        => $this->apiKey,
              'format'     => 'json',
              'apiVersion' => self::VERSION,
          ];
  
          $params = array_merge($defaultParams, $params);
  
          $url = sprintf('%s?%s', self::ENDPOINT, http_build_query($params));
  
          $response = $this->adapter->get($url);
  
          $result = json_decode($response->getBody()->getContents(), true);
  
          if ($result['result'] == 'ERR') {
              throw new ApiException($result['message'], $result['code']);
          }
  
          return $result;
      }
code: protected function call(array $params)
      {
          $defaultParams = [
              'key'        => $this->apiKey,
              'format'     => 'json',
              'apiVersion' => self::VERSION,
          ];
  
          $params = array_merge($defaultParams, $params);
  
          $url = sprintf('%s?%s', self::ENDPOINT, http_build_query($params));
  
          $response = $this->adapter->get($url);
  
          $result = json_decode($response->getBody()->getContents(), true);
  
          if ($result['result'] == 'ERR') {
              throw new ApiException($result['message'], $result['code']);
          }
  
          return $result;
      }
code_tokens: protected function call ( array $ params ) { $ defaultParams = [ 'key' => $ this -> apiKey , 'format' => 'json' , 'apiVersion' => self :: VERSION , ] ; $ params = array_merge ( $ defaultParams , $ params ) ; $ url = sprintf ( '%s?%s' , self :: ENDPOINT , http_build_query ( $ params ) ) ; $ response = $ this -> adapter -> get ( $ url ) ; $ result = json_decode ( $ response -> getBody ( ) -> getContents ( ) , true ) ; if ( $ result [ 'result' ] == 'ERR' ) { throw new ApiException ( $ result [ 'message' ] , $ result [ 'code' ] ) ; } return $ result ; }
docstring: Sends a call to the API
  
  @param array $params
  
  @return array
  
  @throws ApiException If the API call fails
docstring_tokens: Sends a call to the API