Struct mailchimp_api::file_manager::FileManager
source · pub struct FileManager {
pub client: Client,
}
Fields
client: Client
Implementations
sourceimpl FileManager
impl FileManager
sourcepub async fn get_file(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
type_: &str,
created_by: &str,
before_created_at: &str,
since_created_at: &str,
sort_field: GetFileManagerFilesSortField,
sort_dir: SortDir
) -> Result<FileManager>
pub async fn get_file(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
type_: &str,
created_by: &str,
before_created_at: &str,
since_created_at: &str,
sort_field: GetFileManagerFilesSortField,
sort_dir: SortDir
) -> Result<FileManager>
List stored files.
This function performs a GET
to the /file-manager/files
endpoint.
Get a list of available images and files stored in the File Manager for the account.
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.type_: &str
– The file type for the File Manager file.created_by: &str
– The Mailchimp account user who created the File Manager file.before_created_at: &str
– Restrict the response to files created before the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.since_created_at: &str
– Restrict the response to files created after the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.sort_field: crate::types::GetFileManagerFilesSortField
– Returns files sorted by the specified field.sort_dir: crate::types::SortDir
– Determines the order direction for sorted results.
sourcepub async fn post(&self, body: &GalleryFile) -> Result<Files>
pub async fn post(&self, body: &GalleryFile) -> Result<Files>
Add file.
This function performs a POST
to the /file-manager/files
endpoint.
Upload a new image or file to the File Manager.
sourcepub async fn get_file_file_manager(
&self,
fields: &[String],
exclude_fields: &[String],
file_id: &str
) -> Result<Files>
pub async fn get_file_file_manager(
&self,
fields: &[String],
exclude_fields: &[String],
file_id: &str
) -> Result<Files>
Get file.
This function performs a GET
to the /file-manager/files/{file_id}
endpoint.
Get information about a specific file in the File Manager.
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.file_id: &str
– The unique id for the File Manager file.
sourcepub async fn delete_files(&self, file_id: &str) -> Result<()>
pub async fn delete_files(&self, file_id: &str) -> Result<()>
Delete file.
This function performs a DELETE
to the /file-manager/files/{file_id}
endpoint.
Remove a specific file from the File Manager.
Parameters:
file_id: &str
– The unique id for the File Manager file.
sourcepub async fn patch_files(
&self,
file_id: &str,
body: &GalleryFileData
) -> Result<Files>
pub async fn patch_files(
&self,
file_id: &str,
body: &GalleryFileData
) -> Result<Files>
Update file.
This function performs a PATCH
to the /file-manager/files/{file_id}
endpoint.
Update a file in the File Manager.
Parameters:
file_id: &str
– The unique id for the File Manager file.
sourcepub async fn get_folder(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
created_by: &str,
before_created_at: &str,
since_created_at: &str
) -> Result<FileManagerFolders>
pub async fn get_folder(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
created_by: &str,
before_created_at: &str,
since_created_at: &str
) -> Result<FileManagerFolders>
List folders.
This function performs a GET
to the /file-manager/folders
endpoint.
Get a list of all folders in the File Manager.
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.created_by: &str
– The Mailchimp account user who created the File Manager file.before_created_at: &str
– Restrict the response to files created before the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.since_created_at: &str
– Restrict the response to files created after the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
sourcepub async fn post_folder(
&self,
body: &GalleryFolder
) -> Result<FileManagerFoldersGalleryFolder>
pub async fn post_folder(
&self,
body: &GalleryFolder
) -> Result<FileManagerFoldersGalleryFolder>
Add folder.
This function performs a POST
to the /file-manager/folders
endpoint.
Create a new folder in the File Manager.
sourcepub async fn get_folder_file_manager(
&self,
fields: &[String],
exclude_fields: &[String],
folder_id: &str
) -> Result<FileManagerFoldersGalleryFolder>
pub async fn get_folder_file_manager(
&self,
fields: &[String],
exclude_fields: &[String],
folder_id: &str
) -> Result<FileManagerFoldersGalleryFolder>
Get folder.
This function performs a GET
to the /file-manager/folders/{folder_id}
endpoint.
Get information about a specific folder in the File Manager.
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.folder_id: &str
– The unique id for the File Manager folder.
sourcepub async fn delete_folders(&self, folder_id: &str) -> Result<()>
pub async fn delete_folders(&self, folder_id: &str) -> Result<()>
Delete folder.
This function performs a DELETE
to the /file-manager/folders/{folder_id}
endpoint.
Delete a specific folder in the File Manager.
Parameters:
folder_id: &str
– The unique id for the File Manager folder.
sourcepub async fn patch_folders(
&self,
folder_id: &str,
body: &GalleryFolder
) -> Result<FileManagerFoldersGalleryFolder>
pub async fn patch_folders(
&self,
folder_id: &str,
body: &GalleryFolder
) -> Result<FileManagerFoldersGalleryFolder>
Update folder.
This function performs a PATCH
to the /file-manager/folders/{folder_id}
endpoint.
Update a specific File Manager folder.
Parameters:
folder_id: &str
– The unique id for the File Manager folder.