pub struct SfacgClient { /* private fields */ }Expand description
Sfacg client, use it to access Apis
Implementations§
Trait Implementations§
Source§impl Client for SfacgClient
impl Client for SfacgClient
Source§fn cert(&mut self, cert_path: PathBuf)
fn cert(&mut self, cert_path: PathBuf)
Set the certificate path for use with packet capture tools
Add cookie
Source§async fn log_in(
&self,
username: String,
password: Option<String>,
) -> Result<(), Error>
async fn log_in( &self, username: String, password: Option<String>, ) -> Result<(), Error>
Login in
Source§async fn user_info(&self) -> Result<UserInfo, Error>
async fn user_info(&self) -> Result<UserInfo, Error>
Get the information of the logged-in user
Source§async fn bookshelf_infos(&self) -> Result<Vec<u32>, Error>
async fn bookshelf_infos(&self) -> Result<Vec<u32>, Error>
Get the favorite novel of the logged-in user and return the novel id
Source§async fn comments(
&self,
id: u32,
comment_type: CommentType,
need_replies: bool,
page: u16,
size: u16,
) -> Result<Option<Vec<Comment>>, Error>
async fn comments( &self, id: u32, comment_type: CommentType, need_replies: bool, page: u16, size: u16, ) -> Result<Option<Vec<Comment>>, Error>
Get comments of the novel
Source§async fn volume_infos(&self, id: u32) -> Result<Option<VolumeInfos>, Error>
async fn volume_infos(&self, id: u32) -> Result<Option<VolumeInfos>, Error>
Get volume Information
Source§async fn content_infos(&self, info: &ChapterInfo) -> Result<ContentInfos, Error>
async fn content_infos(&self, info: &ChapterInfo) -> Result<ContentInfos, Error>
Get content Information
Source§async fn content_infos_multiple(
&self,
infos: &[ChapterInfo],
) -> Result<Vec<ContentInfos>, Error>
async fn content_infos_multiple( &self, infos: &[ChapterInfo], ) -> Result<Vec<ContentInfos>, Error>
Get multiple content Information
Source§async fn order_chapter(&self, info: &ChapterInfo) -> Result<(), Error>
async fn order_chapter(&self, info: &ChapterInfo) -> Result<(), Error>
Order chapter
Source§async fn order_novel(&self, id: u32, _: &VolumeInfos) -> Result<(), Error>
async fn order_novel(&self, id: u32, _: &VolumeInfos) -> Result<(), Error>
Order the whole novel
Get all tags
Source§async fn search_infos(
&self,
option: &Options,
page: u16,
size: u16,
) -> Result<Option<Vec<u32>>, Error>
async fn search_infos( &self, option: &Options, page: u16, size: u16, ) -> Result<Option<Vec<u32>>, Error>
Search all matching novels
Source§fn has_this_type_of_comments(comment_type: CommentType) -> bool
fn has_this_type_of_comments(comment_type: CommentType) -> bool
Does the app have comment in this type
Auto Trait Implementations§
impl !Freeze for SfacgClient
impl !RefUnwindSafe for SfacgClient
impl Send for SfacgClient
impl Sync for SfacgClient
impl Unpin for SfacgClient
impl !UnwindSafe for SfacgClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more