Struct mailchimp_api::batches::Batches
source · pub struct Batches {
pub client: Client,
}
Fields
client: Client
Implementations
sourceimpl Batches
impl Batches
sourcepub async fn get(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64
) -> Result<BatchOperations>
pub async fn get(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64
) -> Result<BatchOperations>
List batch requests.
This function performs a GET
to the /batches
endpoint.
Get a summary of batch requests that have been made.
Parameters:
fields: &[String]
– A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.exclude_fields: &[String]
– A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.count: i64
– The number of records to return. Default value is 10. Maximum value is 1000.offset: i64
– Used for pagination, this it the number of records from a collection to skip. Default value is 0.
sourcepub async fn post(&self, body: &PostBatchesRequest) -> Result<Batch>
pub async fn post(&self, body: &PostBatchesRequest) -> Result<Batch>
Start batch operation.
This function performs a POST
to the /batches
endpoint.
Begin processing a batch operations request.
sourcepub async fn get_batches(
&self,
fields: &[String],
exclude_fields: &[String],
batch_id: &str
) -> Result<Batch>
pub async fn get_batches(
&self,
fields: &[String],
exclude_fields: &[String],
batch_id: &str
) -> Result<Batch>
Get batch operation status.
This function performs a GET
to the /batches/{batch_id}
endpoint.
Get the status of a batch request.
Parameters:
fields: &[String]
– A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.exclude_fields: &[String]
– A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.batch_id: &str
– The unique id for the batch operation.
sourcepub async fn delete(&self, batch_id: &str) -> Result<()>
pub async fn delete(&self, batch_id: &str) -> Result<()>
Delete batch request.
This function performs a DELETE
to the /batches/{batch_id}
endpoint.
Stops a batch request from running. Since only one batch request is run at a time, this can be used to cancel a long running request. The results of any completed operations will not be available after this call.
Parameters:
batch_id: &str
– The unique id for the batch operation.
Auto Trait Implementations
impl !RefUnwindSafe for Batches
impl Send for Batches
impl Sync for Batches
impl Unpin for Batches
impl !UnwindSafe for Batches
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more