Struct scoopit_api::requests::SearchRequest
source · 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,
}Expand description
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: SearchRequestTypestring - type of object searched: “user”, “topic” or “post”
query: Stringstring - 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
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: boolbool optional, default to true - returns or not creator of each returned topic. only for type=“topic”
get_stats: boolbool optional, default to true - returns or not stats for each returned topic. only for type=“topic”
bool optional, default to true - returns or not tags for topic of each returned post. only for type=“post”
get_stats_for_topic: boolbool optional, default to true - returns or not stats for topic of each returned post. only for type=“post”