pub struct GetNewsSourcesParams {
pub id: Option<Vec<String>>,
pub country: Option<Vec<String>>,
pub category: Option<Vec<String>>,
pub exclude_category: Option<Vec<String>>,
pub language: Option<String>,
pub priority_domain: Option<String>,
}
Expand description
Parameters for the get_news_sources
method.
Fields§
§id: Option<Vec<String>>
Unique identifier of the news source.
Max no. of id could be added: 50
country: Option<Vec<String>>
Country code for the news sources.
Max no. of country could be added: 5.
Examples: “hk”, “us”, “wo”
category: Option<Vec<String>>
Category for the news sources.
Max no. of category could be added: 5.
Possible values: “business”, “crime”, “domestic”, “education”, “entertainment”, “environment”, “food”, “health”, “lifestyle”, “other”, “politics”, “science”, “sports”, “technology”, “top”, “tourism”, “world”
exclude_category: Option<Vec<String>>
Exclude category for the news sources.
Max no. of category could be added: 5.
Exclusive with category.
Possible values: “business”, “crime”, “domestic”, “education”, “entertainment”, “environment”, “food”, “health”, “lifestyle”, “other”, “politics”, “science”, “sports”, “technology”, “top”, “tourism”, “world”
language: Option<String>
Language code for the news sources.
Max no. of language could be added: 5.
priority_domain: Option<String>
Priority domain for the news articles.
Top: Fetches news articles from the top 10% of the news domains
Medium: Fetches news articles from the top 30% of the news domains. It means it already includes all the news articles of “top” priority.
Low: Fetches news articles from the top 50% of the news domains. It means it already includes all the news articles of “top” and “medium” priorities.
Implementations§
Source§impl GetNewsSourcesParams
impl GetNewsSourcesParams
Sourcepub fn default() -> Self
pub fn default() -> Self
Creates a new GetNewsSourcesParams
with default values.
This method sets the default values for all parameters, which are:
id
:None
country
:None
category
:None
exclude_category
:None
language
:None
priority_domain
:None
This allows you to easily create a GetNewsSourcesParams
object without having to specify all the parameters manually.