diff --git a/src/api_core/endpoints/searching_and_fetching_files.rs b/src/api_core/endpoints/searching_and_fetching_files.rs index 523cfd0..0faac7b 100644 --- a/src/api_core/endpoints/searching_and_fetching_files.rs +++ b/src/api_core/endpoints/searching_and_fetching_files.rs @@ -207,11 +207,7 @@ pub struct FileFullMetadata { pub is_trashed: bool, pub file_services: FileMetadataServices, pub known_urls: Vec, - #[deprecated] - pub service_names_to_statuses_to_tags: HashMap>>, pub service_keys_to_statuses_to_tags: HashMap>>, - #[deprecated] - pub service_names_to_statuses_to_display_tags: HashMap>>, pub service_keys_to_statuses_to_display_tags: HashMap>>, } diff --git a/src/wrapper/hydrus_file.rs b/src/wrapper/hydrus_file.rs index a0f09c1..a81406f 100644 --- a/src/wrapper/hydrus_file.rs +++ b/src/wrapper/hydrus_file.rs @@ -7,7 +7,7 @@ use crate::error::{Error, Result}; use crate::utils::tag_list_to_string_list; use crate::wrapper::builders::delete_files_builder::DeleteFilesBuilder; use crate::wrapper::builders::notes_builder::AddNotesBuilder; -use crate::wrapper::service::ServiceName; + use crate::wrapper::tag::Tag; use crate::Client; use chrono::{NaiveDateTime, TimeZone, Utc}; @@ -289,18 +289,19 @@ impl HydrusFile { /// /// Deprecation: Use [HydrusFile::services_with_tags] instead. #[deprecated(note = "Deprecated in the official API. Use services_with_tags instead.")] - pub async fn service_names_with_tags(&mut self) -> Result>> { + pub async fn service_names_with_tags( + &mut self, + ) -> Result>> { let metadata = self.metadata().await?; let mut tag_mappings = HashMap::new(); - #[allow(deprecated)] - for (service, status_tags) in &metadata.service_names_to_statuses_to_tags { + for (service, status_tags) in &metadata.service_keys_to_statuses_to_tags { let mut tag_list = Vec::new(); for (_, tags) in status_tags { tag_list.append(&mut tags.into_iter().map(|t| t.into()).collect()) } - tag_mappings.insert(ServiceName(service.clone()), tag_list); + tag_mappings.insert(ServiceIdentifier::Key(service.clone()), tag_list); } Ok(tag_mappings)