pub struct GetLatestNewsParams {Show 23 fields
pub id: Option<Vec<String>>,
pub q: Option<String>,
pub q_in_title: Option<String>,
pub q_in_meta: Option<String>,
pub timeframe: Option<String>,
pub country: Option<Vec<String>>,
pub category: Option<Vec<String>>,
pub exclude_category: Option<Vec<String>>,
pub language: Option<String>,
pub tag: Option<String>,
pub sentiment: Option<String>,
pub region: Option<String>,
pub domain: Option<String>,
pub exclude_domain: Option<String>,
pub domain_url: Option<String>,
pub exclude_field: Option<String>,
pub priority_domain: Option<String>,
pub timezone: Option<String>,
pub full_content: Option<Flag>,
pub image: Option<Flag>,
pub video: Option<Flag>,
pub size: Option<i32>,
pub page: Option<String>,
}
Expand description
Parameters for the get_latest
method.
Fields§
§id: Option<Vec<String>>
Unique identifier of the news article.
Max no. of id could be added: 50
q: Option<String>
Keywords to search for in the news articles.
Max characters: 512.
Exclusive with q_in_title and q_in_meta
q_in_title: Option<String>
Keywords to search for in the title of the news articles.
Max characters: 512.
Exclusive with q and q_in_meta
q_in_meta: Option<String>
Keywords to search for in the meta description of the news articles.
Max characters: 512.
Exclusive with q and q_in_title
timeframe: Option<String>
Timeframe for the news articles.
Only hours or minutes is permitted.
Examples: 6 for 6 hours, 15m for 15 min
country: Option<Vec<String>>
Country code for the news articles.
Max no. of country could be added: 5.
Examples: “hk”, “us”, “wo”
category: Option<Vec<String>>
Category for the news articles.
Max no. of category could be added: 5.
Exclusive with exclude_category.
Possible values: “business”, “crime”, “domestic”, “education”, “entertainment”, “environment”, “food”, “health”, “lifestyle”, “other”, “politics”, “science”, “sports”, “technology”, “top”, “tourism”, “world”
exclude_category: Option<Vec<String>>
Category to exclude from the results.
Max no. of exclude_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 articles.
Max no. of language could be added: 5.
tag: Option<String>
Tag for the news articles.
Max no. of tag could be added: 5.
Available only for Professional and Corporate users
Possible values in here
sentiment: Option<String>
Sentiment for the news articles.
Possible values: “positive”, “negative”, “neutral”.
Available only for Professional and Corporate users
region: Option<String>
Region for the news articles.
Max no. of region could be added: 5.
Available only for Corporate users
domain: Option<String>
Domain for the news articles.
Max no. of domain could be added: 5.
Possible values in here
exclude_domain: Option<String>
Domain to exclude from the results.
Max no. of domain could be added: 5.
Possible values in here
domain_url: Option<String>
Domain URL for the news articles.
Max no. of domain could be added: 5.
exclude_field: Option<String>
Field to exclude from the results.
“article_id” is not excludable in response
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.
timezone: Option<String>
Timezone for the news articles.
full_content: Option<Flag>
Whether to include full content in the results.
image: Option<Flag>
Whether to include images in the results.
video: Option<Flag>
Whether to include videos in the results.
size: Option<i32>
Number of results to return.
Could only be 1 to 50
page: Option<String>
page parameter from last result
Detail
Implementations§
Source§impl GetLatestNewsParams
impl GetLatestNewsParams
Sourcepub fn default() -> Self
pub fn default() -> Self
Creates a new GetLatestNewsParams
with default values.
This method sets the default values for all parameters, which are:
id
:None
q
:None
q_in_title
:None
q_in_meta
:None
timeframe
:None
country
:None
category
:None
exclude_category
:None
language
:None
tag
:None
sentiment
:None
region
:None
domain
:None
exclude_domain
:None
domain_url
:None
exclude_field
:None
priority_domain
:None
timezone
:None
full_content
:Some(Flag::False)
image
:Some(Flag::False)
video
:Some(Flag::False)
size
:None
page
:None
This allows you to easily create a GetLatestNewsParams
object without having to specify all the parameters manually.