private function call($module, $params = array()) {
    // set api data
    $params['api_key'] = $this->api_key;
    $params['format']  = $this->resp_type;

    // build URL
    $url = $this->endpoint . $module . '?' . http_build_query($params);

    // Set URL 
    curl_setopt($this->ch, CURLOPT_URL, $url);

    // Send the request & save response to $resp
    $resp['data'] = curl_exec($this->ch);
    if (curl_errno($this->ch)) {
      throw new GiantBombException('API call failed: ' . curl_error($this->ch));
    }

    // save http response code
    $resp['httpCode'] = curl_getinfo($this->ch, CURLINFO_HTTP_CODE);

    if (!$resp || !$resp['data']) {
      throw new GiantBombException("Couldn't get information from API");
    }

    return $resp;
  }
private function call($module, $params = array()) {
    // set api data
    $params['api_key'] = $this->api_key;
    $params['format']  = $this->resp_type;

    // build URL
    $url = $this->endpoint . $module . '?' . http_build_query($params);

    // Set URL 
    curl_setopt($this->ch, CURLOPT_URL, $url);

    // Send the request & save response to $resp
    $resp['data'] = curl_exec($this->ch);
    if (curl_errno($this->ch)) {
      throw new GiantBombException('API call failed: ' . curl_error($this->ch));
    }

    // save http response code
    $resp['httpCode'] = curl_getinfo($this->ch, CURLINFO_HTTP_CODE);

    if (!$resp || !$resp['data']) {
      throw new GiantBombException("Couldn't get information from API");
    }

    return $resp;
  }
private function call ( $ module , $ params = array ( ) ) { // set api data $ params [ 'api_key' ] = $ this -> api_key ; $ params [ 'format' ] = $ this -> resp_type ; // build URL $ url = $ this -> endpoint . $ module . '?' . http_build_query ( $ params ) ; // Set URL  curl_setopt ( $ this -> ch , CURLOPT_URL , $ url ) ; // Send the request & save response to $resp $ resp [ 'data' ] = curl_exec ( $ this -> ch ) ; if ( curl_errno ( $ this -> ch ) ) { throw new GiantBombException ( 'API call failed: ' . curl_error ( $ this -> ch ) ) ; } // save http response code $ resp [ 'httpCode' ] = curl_getinfo ( $ this -> ch , CURLINFO_HTTP_CODE ) ; if ( ! $ resp || ! $ resp [ 'data' ] ) { throw new GiantBombException ( "Couldn't get information from API" ) ; } return $ resp ; }
Send call to API

@param $module string name of url suffix
@param $params array  get parameters to send to API

@return array response of API
Send call to API