|
|
@ -12,13 +12,18 @@
|
|
|
|
//! use hydrus_api::wrapper::service::ServiceName;
|
|
|
|
//! use hydrus_api::wrapper::service::ServiceName;
|
|
|
|
//! use hydrus_api::wrapper::hydrus_file::FileStatus;
|
|
|
|
//! use hydrus_api::wrapper::hydrus_file::FileStatus;
|
|
|
|
//! use hydrus_api::wrapper::page::PageIdentifier;
|
|
|
|
//! use hydrus_api::wrapper::page::PageIdentifier;
|
|
|
|
|
|
|
|
//! use hydrus_api::wrapper::builders::tag_builder::{SystemTagBuilder, Comparator};
|
|
|
|
//!
|
|
|
|
//!
|
|
|
|
//! # #[tokio::test]
|
|
|
|
//! # #[tokio::test]
|
|
|
|
//! # async fn doctest() {
|
|
|
|
//! # async fn doctest() {
|
|
|
|
//! let hydrus_url = env::var("HYDRUS_URL").unwrap();
|
|
|
|
//! let hydrus_url = env::var("HYDRUS_URL").unwrap();
|
|
|
|
//! let access_key = env::var("HYDRUS_ACCESS_KEY").unwrap();
|
|
|
|
//! let access_key = env::var("HYDRUS_ACCESS_KEY").unwrap();
|
|
|
|
//! let hydrus = Hydrus::new(Client::new(hydrus_url, access_key));
|
|
|
|
//! let hydrus = Hydrus::new(Client::new(hydrus_url, access_key));
|
|
|
|
//! let files = hydrus.search(vec![Tag::from("character:megumin")]).await.unwrap();
|
|
|
|
//! let files = hydrus.search(vec![
|
|
|
|
|
|
|
|
//! Tag::from("character:megumin"),
|
|
|
|
|
|
|
|
//! SystemTagBuilder::new().archive().build(),
|
|
|
|
|
|
|
|
//! SystemTagBuilder::new().tag_namespace_as_number("page", Comparator::Equal, 5).negate().build(),
|
|
|
|
|
|
|
|
//! ]).await.unwrap();
|
|
|
|
//!
|
|
|
|
//!
|
|
|
|
//! for mut file in files {
|
|
|
|
//! for mut file in files {
|
|
|
|
//! file.add_tags(ServiceName::my_tags(), vec![Tag::from("ark mage")]).await.unwrap();
|
|
|
|
//! file.add_tags(ServiceName::my_tags(), vec![Tag::from("ark mage")]).await.unwrap();
|
|
|
|