Struct databento::historical::batch::BatchClient
source · pub struct BatchClient<'a> { /* private fields */ }
historical
only.Expand description
A client for the batch group of Historical API endpoints.
Implementations§
source§impl BatchClient<'_>
impl BatchClient<'_>
sourcepub async fn submit_job(&mut self, params: &SubmitJobParams) -> Result<BatchJob>
pub async fn submit_job(&mut self, params: &SubmitJobParams) -> Result<BatchJob>
Submits a new batch job and returns a description and identifiers for the job.
§Errors
This function returns an error when it fails to communicate with the Databento API or the API indicates there’s an issue with the request.
sourcepub async fn list_jobs(
&mut self,
params: &ListJobsParams,
) -> Result<Vec<BatchJob>>
pub async fn list_jobs( &mut self, params: &ListJobsParams, ) -> Result<Vec<BatchJob>>
Lists previous batch jobs with filtering by params
.
§Errors
This function returns an error when it fails to communicate with the Databento API or the API indicates there’s an issue with the request.
sourcepub async fn list_files(&mut self, job_id: &str) -> Result<Vec<BatchFileDesc>>
pub async fn list_files(&mut self, job_id: &str) -> Result<Vec<BatchFileDesc>>
Lists all files associated with the batch job with ID job_id
.
§Errors
This function returns an error when it fails to communicate with the Databento API or the API indicates there’s an issue with the request.
sourcepub async fn download(
&mut self,
params: &DownloadParams,
) -> Result<Vec<PathBuf>>
pub async fn download( &mut self, params: &DownloadParams, ) -> Result<Vec<PathBuf>>
Downloads the file specified in params
or all files associated with the job ID.
§Errors
This function returns an error when it fails to communicate with the Databento API or the API indicates there’s an issue with the request. It will also return an error if it encounters an issue downloading a file.