public function get_object($type, $id, $field_list = array()) {
    if ($this->cache) {
      $signature = $this->createSignature($type . '/' . $id, $field_list);
      if ($this->cache->contains($signature)) {
        return $this->cache->fetch($signature);
      }
    }

    $resp = $this->call($type . '/' . $id, array('field_list' => implode(',', $field_list)));

    // No game/review/company/character with given id found
    if ($resp['httpCode'] == 404) {
      throw new GiantBombException("Couldn't find " . $type . ' with ' . $type . ' id "' . $id . '"');
    }

    $result = $this->parse_result($resp['data']);

    if ($this->cache) {
      $this->cache->save($signature, $result);
    }

    return $result;
  }
public function get_object($type, $id, $field_list = array()) {
    if ($this->cache) {
      $signature = $this->createSignature($type . '/' . $id, $field_list);
      if ($this->cache->contains($signature)) {
        return $this->cache->fetch($signature);
      }
    }

    $resp = $this->call($type . '/' . $id, array('field_list' => implode(',', $field_list)));

    // No game/review/company/character with given id found
    if ($resp['httpCode'] == 404) {
      throw new GiantBombException("Couldn't find " . $type . ' with ' . $type . ' id "' . $id . '"');
    }

    $result = $this->parse_result($resp['data']);

    if ($this->cache) {
      $this->cache->save($signature, $result);
    }

    return $result;
  }
public function get_object ( $ type , $ id , $ field_list = array ( ) ) { if ( $ this -> cache ) { $ signature = $ this -> createSignature ( $ type . '/' . $ id , $ field_list ) ; if ( $ this -> cache -> contains ( $ signature ) ) { return $ this -> cache -> fetch ( $ signature ) ; } } $ resp = $ this -> call ( $ type . '/' . $ id , array ( 'field_list' => implode ( ',' , $ field_list ) ) ) ; // No game/review/company/character with given id found if ( $ resp [ 'httpCode' ] == 404 ) { throw new GiantBombException ( "Couldn't find " . $ type . ' with ' . $ type . ' id "' . $ id . '"' ) ; } $ result = $ this -> parse_result ( $ resp [ 'data' ] ) ; if ( $ this -> cache ) { $ this -> cache -> save ( $ signature , $ result ) ; } return $ result ; }
Get information about given object type

@param  $id         string  ID to request
@param  $field_list array   list of fields to response

@return array response
Get information about given object type