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: 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

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
The type returned by the Scoop.it API. Read more
The type returned by the client
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more