getCodeFileWithHttpInfo method

Future<Response> getCodeFileWithHttpInfo({
  1. String? pathParam,
  2. String? repo,
})

Returns the INDEXED content of one file — read_file over the chunks the search tiers hold, for pulling up code an agent just found.

Returns the INDEXED content of one file — read_file over the chunks the search tiers hold, for pulling up code an agent just found. It is NOT byte-verbatim: the git object plane is the source of record for exact bytes, history and blame. A file absent from the index is a 404, so an agent can tell "not indexed" from "empty file".

Note: This method returns the HTTP Response.

Parameters:

  • String pathParam: Path is the file's repo-relative path. Required.

  • String repo: Repo is the repository the file belongs to. REQUIRED.

Implementation

Future<Response> getCodeFileWithHttpInfo({ String? pathParam, String? repo, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/code/file';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (pathParam != null) {
    queryParams.addAll(_queryParams('', 'path', pathParam));
  }
  if (repo != null) {
    queryParams.addAll(_queryParams('', 'repo', repo));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}