parent
deccbee806
commit
c746212e7d
@ -1,5 +1,5 @@
|
|||||||
use crate::endpoints::common::BasicServiceInfo;
|
use crate::api_core::common::BasicServiceInfo;
|
||||||
use crate::endpoints::Endpoint;
|
use crate::api_core::Endpoint;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
pub static SERVICE_TYPE_LOCAL_TAGS: &str = "local_tags";
|
pub static SERVICE_TYPE_LOCAL_TAGS: &str = "local_tags";
|
@ -1,5 +1,5 @@
|
|||||||
use crate::endpoints::common::BasicHashList;
|
use crate::api_core::common::BasicHashList;
|
||||||
use crate::endpoints::Endpoint;
|
use crate::api_core::Endpoint;
|
||||||
|
|
||||||
pub static STATUS_IMPORT_SUCCESS: u8 = 1;
|
pub static STATUS_IMPORT_SUCCESS: u8 = 1;
|
||||||
pub static STATUS_IMPORT_ALREADY_EXISTS: u8 = 2;
|
pub static STATUS_IMPORT_ALREADY_EXISTS: u8 = 2;
|
@ -1,4 +1,4 @@
|
|||||||
use crate::endpoints::Endpoint;
|
use crate::api_core::Endpoint;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
@ -1,5 +1,5 @@
|
|||||||
use crate::endpoints::common::FileMetadataInfo;
|
use crate::api_core::common::FileMetadataInfo;
|
||||||
use crate::endpoints::Endpoint;
|
use crate::api_core::Endpoint;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
pub struct SearchFilesResponse {
|
pub struct SearchFilesResponse {
|
@ -1,12 +1,12 @@
|
|||||||
use crate::endpoints::adding_files::{STATUS_IMPORT_FAILED, STATUS_IMPORT_VETOED};
|
use crate::api_core::adding_files::{STATUS_IMPORT_FAILED, STATUS_IMPORT_VETOED};
|
||||||
use crate::endpoints::adding_urls::AddUrlRequestBuilder;
|
use crate::api_core::adding_urls::AddUrlRequestBuilder;
|
||||||
use crate::error::{Error, Result};
|
use crate::error::{Error, Result};
|
||||||
use crate::hydrus_file::HydrusFile;
|
|
||||||
use crate::models::url::Url;
|
|
||||||
use crate::page::PageIdentifier;
|
|
||||||
use crate::service::ServiceName;
|
|
||||||
use crate::tag::Tag;
|
|
||||||
use crate::utils::tag_list_to_string_list;
|
use crate::utils::tag_list_to_string_list;
|
||||||
|
use crate::wrapper::hydrus_file::HydrusFile;
|
||||||
|
use crate::wrapper::page::PageIdentifier;
|
||||||
|
use crate::wrapper::service::ServiceName;
|
||||||
|
use crate::wrapper::tag::Tag;
|
||||||
|
use crate::wrapper::url::Url;
|
||||||
use crate::Client;
|
use crate::Client;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::io::Read;
|
use std::io::Read;
|
@ -1,7 +1,7 @@
|
|||||||
use crate::endpoints::adding_tags::{AddTagsRequestBuilder, TagAction};
|
use crate::api_core::adding_tags::{AddTagsRequestBuilder, TagAction};
|
||||||
use crate::error::Result;
|
use crate::error::Result;
|
||||||
use crate::models::tag::Tag;
|
use crate::wrapper::service::ServiceName;
|
||||||
use crate::service::ServiceName;
|
use crate::wrapper::tag::Tag;
|
||||||
use crate::Client;
|
use crate::Client;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
@ -1,16 +1,18 @@
|
|||||||
use crate::builders::import_builder::ImportBuilder;
|
use crate::api_core::common::FileIdentifier;
|
||||||
use crate::builders::tagging_builder::TaggingBuilder;
|
use crate::api_core::searching_and_fetching_files::FileSearchLocation;
|
||||||
use crate::endpoints::common::FileIdentifier;
|
|
||||||
use crate::endpoints::searching_and_fetching_files::FileSearchLocation;
|
|
||||||
use crate::error::Result;
|
use crate::error::Result;
|
||||||
use crate::hydrus_file::HydrusFile;
|
|
||||||
use crate::models::url::Url;
|
|
||||||
use crate::models::version::Version;
|
|
||||||
use crate::service::Services;
|
|
||||||
use crate::tag::Tag;
|
|
||||||
use crate::utils::tag_list_to_string_list;
|
use crate::utils::tag_list_to_string_list;
|
||||||
|
use crate::wrapper::builders::import_builder::ImportBuilder;
|
||||||
|
use crate::wrapper::builders::tagging_builder::TaggingBuilder;
|
||||||
|
use crate::wrapper::hydrus_file::HydrusFile;
|
||||||
|
use crate::wrapper::service::Services;
|
||||||
|
use crate::wrapper::tag::Tag;
|
||||||
|
use crate::wrapper::url::Url;
|
||||||
|
use crate::wrapper::version::Version;
|
||||||
use crate::Client;
|
use crate::Client;
|
||||||
|
|
||||||
|
/// A high level wrapper for the hydrus API for easier management of files, tags
|
||||||
|
/// urls etc.
|
||||||
pub struct Hydrus {
|
pub struct Hydrus {
|
||||||
client: Client,
|
client: Client,
|
||||||
}
|
}
|
@ -1,9 +1,9 @@
|
|||||||
use crate::endpoints::adding_tags::{AddTagsRequestBuilder, TagAction};
|
use crate::api_core::adding_tags::{AddTagsRequestBuilder, TagAction};
|
||||||
use crate::endpoints::common::{FileIdentifier, FileMetadataInfo, FileRecord};
|
use crate::api_core::common::{FileIdentifier, FileMetadataInfo, FileRecord};
|
||||||
use crate::error::{Error, Result};
|
use crate::error::{Error, Result};
|
||||||
use crate::service::ServiceName;
|
|
||||||
use crate::tag::Tag;
|
|
||||||
use crate::utils::tag_list_to_string_list;
|
use crate::utils::tag_list_to_string_list;
|
||||||
|
use crate::wrapper::service::ServiceName;
|
||||||
|
use crate::wrapper::tag::Tag;
|
||||||
use crate::Client;
|
use crate::Client;
|
||||||
use mime::Mime;
|
use mime::Mime;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
@ -1,5 +1,5 @@
|
|||||||
use crate::endpoints::access_management::GetServicesResponse;
|
use crate::api_core::access_management::GetServicesResponse;
|
||||||
use crate::endpoints::access_management::{
|
use crate::api_core::access_management::{
|
||||||
SERVICE_TYPE_ALL_KNOWN_FILES, SERVICE_TYPE_ALL_KNOWN_TAGS, SERVICE_TYPE_ALL_LOCAL_FILES,
|
SERVICE_TYPE_ALL_KNOWN_FILES, SERVICE_TYPE_ALL_KNOWN_TAGS, SERVICE_TYPE_ALL_LOCAL_FILES,
|
||||||
SERVICE_TYPE_FILE_REPOSITORIES, SERVICE_TYPE_LOCAL_FILES, SERVICE_TYPE_LOCAL_TAGS,
|
SERVICE_TYPE_FILE_REPOSITORIES, SERVICE_TYPE_LOCAL_FILES, SERVICE_TYPE_LOCAL_TAGS,
|
||||||
SERVICE_TYPE_TAG_REPOSITORIES, SERVICE_TYPE_TRASH,
|
SERVICE_TYPE_TAG_REPOSITORIES, SERVICE_TYPE_TRASH,
|
@ -1,9 +1,9 @@
|
|||||||
use crate::builders::import_builder::UrlImportBuilder;
|
use crate::api_core::adding_urls::{
|
||||||
use crate::endpoints::adding_urls::{
|
|
||||||
URL_TYPE_FILE, URL_TYPE_GALLERY, URL_TYPE_POST, URL_TYPE_WATCHABLE,
|
URL_TYPE_FILE, URL_TYPE_GALLERY, URL_TYPE_POST, URL_TYPE_WATCHABLE,
|
||||||
};
|
};
|
||||||
use crate::error::Result;
|
use crate::error::Result;
|
||||||
use crate::hydrus_file::HydrusFile;
|
use crate::wrapper::builders::import_builder::UrlImportBuilder;
|
||||||
|
use crate::wrapper::hydrus_file::HydrusFile;
|
||||||
use crate::Client;
|
use crate::Client;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialOrd, PartialEq)]
|
#[derive(Clone, Debug, PartialOrd, PartialEq)]
|
Loading…
Reference in New Issue