Struct pixiv::PixivRequestBuilder [−][src]
pub struct PixivRequestBuilder<'a> { /* fields omitted */ }
Pixiv request builder. You can create this using any of the provided methods in Pixiv
, or through PixivRequestBuilder::new
.
Methods
impl<'a> PixivRequestBuilder<'a>
[src]
impl<'a> PixivRequestBuilder<'a>
pub fn new(
pixiv: &'a Pixiv,
method: Method,
url: Url,
params: HashMap<&'a str, Cow<'a, str>>
) -> PixivRequestBuilder<'a>
[src]
pub fn new(
pixiv: &'a Pixiv,
method: Method,
url: Url,
params: HashMap<&'a str, Cow<'a, str>>
) -> PixivRequestBuilder<'a>
Create a new PixivRequestBuilder
.
Functions in Pixiv
expedite a lot of this for you, so using this directly isn't recommended unless you know what you want.
pub fn page(self, value: usize) -> PixivRequestBuilder<'a>
[src]
pub fn page(self, value: usize) -> PixivRequestBuilder<'a>
Sets the page
param.
pub fn per_page(self, value: usize) -> PixivRequestBuilder<'a>
[src]
pub fn per_page(self, value: usize) -> PixivRequestBuilder<'a>
Sets the per_page
param.
pub fn max_id(self, value: usize) -> PixivRequestBuilder<'a>
[src]
pub fn max_id(self, value: usize) -> PixivRequestBuilder<'a>
Sets the max_id
param.
pub fn image_sizes(self, values: &[&str]) -> PixivRequestBuilder<'a>
[src]
pub fn image_sizes(self, values: &[&str]) -> PixivRequestBuilder<'a>
Sets the image_sizes
param. Available types: px_128x128
, small
, medium
, large
, px_480mw
pub fn profile_image_sizes(self, values: &[&str]) -> PixivRequestBuilder<'a>
[src]
pub fn profile_image_sizes(self, values: &[&str]) -> PixivRequestBuilder<'a>
Sets the profile_image_sizes
param. Available types: px_170x170,px_50x50
pub fn publicity(self, value: Publicity) -> PixivRequestBuilder<'a>
[src]
pub fn publicity(self, value: Publicity) -> PixivRequestBuilder<'a>
Sets the publicity
param. Must be a value of enum Publicity
.
pub fn show_r18(self, value: bool) -> PixivRequestBuilder<'a>
[src]
pub fn show_r18(self, value: bool) -> PixivRequestBuilder<'a>
Sets the show_r18
param. true
means R-18 works will be included.
pub fn include_stats(self, value: bool) -> PixivRequestBuilder<'a>
[src]
pub fn include_stats(self, value: bool) -> PixivRequestBuilder<'a>
Sets the include_stats
param.
pub fn include_sanity_level(self, value: bool) -> PixivRequestBuilder<'a>
[src]
pub fn include_sanity_level(self, value: bool) -> PixivRequestBuilder<'a>
Sets the include_sanity_level
param.
pub fn ranking_mode(self, value: RankingMode) -> PixivRequestBuilder<'a>
[src]
pub fn ranking_mode(self, value: RankingMode) -> PixivRequestBuilder<'a>
Sets the ranking mode in the case of a ranking()
call. Must be a value of enum RankingMode
.
pub fn date<V>(self, value: V) -> PixivRequestBuilder<'a> where
Cow<'a, str>: From<V>,
[src]
pub fn date<V>(self, value: V) -> PixivRequestBuilder<'a> where
Cow<'a, str>: From<V>,
Sets the date
param. Must be a valid date in the form of %Y-%m-%d
, e.g. 2018-2-22
.
pub fn search_period(self, value: SearchPeriod) -> PixivRequestBuilder<'a>
[src]
pub fn search_period(self, value: SearchPeriod) -> PixivRequestBuilder<'a>
Sets the period
param in the case of a search_works()
call. Must be a value of enum SearchPeriod
.
pub fn search_mode(self, value: SearchMode) -> PixivRequestBuilder<'a>
[src]
pub fn search_mode(self, value: SearchMode) -> PixivRequestBuilder<'a>
Sets the mode
param in the case of a search_works()
call. Must be a value of enum SearchMode
.
pub fn search_order(self, value: SearchOrder) -> PixivRequestBuilder<'a>
[src]
pub fn search_order(self, value: SearchOrder) -> PixivRequestBuilder<'a>
Sets the order
param in the case of a search_works()
call. Must be a value of enum SearchOrder
.
pub fn search_sort<V>(self, value: V) -> PixivRequestBuilder<'a> where
Cow<'a, str>: From<V>,
[src]
pub fn search_sort<V>(self, value: V) -> PixivRequestBuilder<'a> where
Cow<'a, str>: From<V>,
Sets the sort
param in the case of a search_works()
call. Not sure if there's any variations here, but this function is included for convenience.
pub fn search_types(self, values: &[&str]) -> PixivRequestBuilder<'a>
[src]
pub fn search_types(self, values: &[&str]) -> PixivRequestBuilder<'a>
Sets the types
param in the case of a search_works()
call. Available values: illustration
, manga
, ugoira
.
pub fn build(self) -> PixivRequest
[src]
pub fn build(self) -> PixivRequest
Returns a PixivRequest
which can be inspected and/or executed with Pixiv::execute()
.
pub fn send(self) -> Result<Response, Error>
[src]
pub fn send(self) -> Result<Response, Error>
Sends the request. This function consumes self
.
Trait Implementations
impl<'a> Debug for PixivRequestBuilder<'a>
[src]
impl<'a> Debug for PixivRequestBuilder<'a>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a> Clone for PixivRequestBuilder<'a>
[src]
impl<'a> Clone for PixivRequestBuilder<'a>
fn clone(&self) -> PixivRequestBuilder<'a>
[src]
fn clone(&self) -> PixivRequestBuilder<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'a> Send for PixivRequestBuilder<'a>
impl<'a> Send for PixivRequestBuilder<'a>
impl<'a> Sync for PixivRequestBuilder<'a>
impl<'a> Sync for PixivRequestBuilder<'a>