Struct rule34::TagListQueryBuilder
source · pub struct TagListQueryBuilder<'a> {
pub id: Option<NonZeroU64>,
pub limit: Option<u16>,
pub pid: Option<u64>,
pub name: Option<&'a str>,
pub name_pattern: Option<&'a str>,
pub order: Option<&'a str>,
/* private fields */
}
Expand description
A query builder to get tags
Fields§
§id: Option<NonZeroU64>
The id
limit: Option<u16>
The max number of tags to return.
This looks like it is capped at 1000, requests for more only return 1000. This behavior is undocumented however. As such, requesting more than 1000 does not trigger an error.
pid: Option<u64>
The page id
This returns the page of the given number, starting at 0. This option is undocumented.
name: Option<&'a str>
The tag name to look up
This is a single tag name. This option is undocumented. This option will attempt to circumvent rule34 bugs where possible by translating the tags into a form the api can understand.
name_pattern: Option<&'a str>
The name pattern to look up using a SQL LIKE clause.
% = multi char wildcard _ = single char wildcard This option is undocumented.
order: Option<&'a str>
The field to order results by.
name: Order by tag name count: Order by tag count
Implementations§
source§impl<'a> TagListQueryBuilder<'a>
impl<'a> TagListQueryBuilder<'a>
sourcepub fn id(&mut self, id: Option<NonZeroU64>) -> &mut Self
pub fn id(&mut self, id: Option<NonZeroU64>) -> &mut Self
Set the tag id
sourcepub fn limit(&mut self, limit: Option<u16>) -> &mut Self
pub fn limit(&mut self, limit: Option<u16>) -> &mut Self
Set the limit.
This looks like it is capped at 1000, requests for more only return 1000. This behavior is undocumented however. As such, requesting more than 1000 does not trigger an error.
sourcepub fn pid(&mut self, pid: Option<u64>) -> &mut Self
pub fn pid(&mut self, pid: Option<u64>) -> &mut Self
Set the page id
This returns the page of the given number, starting at 0. This option is undocumented.
sourcepub fn name(&'a mut self, name: Option<&'a str>) -> &'a mut Self
pub fn name(&'a mut self, name: Option<&'a str>) -> &'a mut Self
The tag name to look up
This is a single tag name. This option is undocumented. This option will attempt to circumvent rule34 bugs where possible by translating the tags into a form the api can understand.
sourcepub fn name_pattern(&'a mut self, name_pattern: Option<&'a str>) -> &'a mut Self
pub fn name_pattern(&'a mut self, name_pattern: Option<&'a str>) -> &'a mut Self
The name pattern to look up using a SQL LIKE clause.
% = multi char wildcard _ = single char wildcard This option is undocumented.
sourcepub fn order(&'a mut self, order: Option<&'a str>) -> &'a mut Self
pub fn order(&'a mut self, order: Option<&'a str>) -> &'a mut Self
The field to order results by.
name: Order by tag name count: Order by tag count This option is undocumented.