[][src]Struct scoopit_api::requests::SearchRequest

pub struct SearchRequest {
    pub search_type: SearchRequestType,
    pub query: String,
    pub count: Option<u32>,
    pub page: Option<u32>,
    pub lang: Option<String>,
    pub topic_id: Option<u32>,
    pub get_tags: bool,
    pub get_creator: bool,
    pub get_stats: bool,
    pub get_tags_for_topic: bool,
    pub get_stats_for_topic: bool,
}

Perform a search.

Maps parameters of https://www.scoop.it/dev/api/1/urls#search

Documentation of each field comes from the page above. Default values documented are used only ff the field is not present (None), Default implementation for this struct may differ from Scoop.it defaults to avoid retrieving the world while only looking at the user profile.

Fields

search_type: SearchRequestType

string - type of object searched: "user", "topic" or "post"

query: String

string - the search query

count: Option<u32>

int optional, default to 50 - the number of item per page

page: Option<u32>

int optional, default to 0 -the page number to return, the first page is 0

lang: Option<String>

string optional, default to "en" - the language of the content to search into

topic_id: Option<u32>

long optional - the id of the topic to search posts into

get_tags: bool

bool optional, default to true - returns or not list of tags for each returned topic / post. only for type="topic" or type="post"

get_creator: bool

bool optional, default to true - returns or not creator of each returned topic. only for type="topic"

get_stats: bool

bool optional, default to true - returns or not stats for each returned topic. only for type="topic"

get_tags_for_topic: bool

bool optional, default to true - returns or not tags for topic of each returned post. only for type="post"

get_stats_for_topic: bool

bool optional, default to true - returns or not stats for topic of each returned post. only for type="post"

Trait Implementations

impl Debug for SearchRequest[src]

impl Default for SearchRequest[src]

impl GetRequest for SearchRequest[src]

type Response = SearchResponse

The type returned by the Scoop.it API. Read more

type Output = SearchResults

The type returned by the client

impl Serialize for SearchRequest[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.