pub struct GetNewsArchiveParams {Show 21 fields
pub id: Option<Vec<String>>,
pub from_date: Option<String>,
pub to_date: Option<String>,
pub q: Option<String>,
pub q_in_title: Option<String>,
pub q_in_meta: Option<String>,
pub country: Option<Vec<String>>,
pub category: Option<Vec<String>>,
pub exclude_category: Option<Vec<String>>,
pub language: 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_news_archive
method.
Fields§
§id: Option<Vec<String>>
Unique identifier of the news article.
Max no. of id could be added: 50
from_date: Option<String>
Start date for the news articles.
If not specified, the api will fetch the data from the past 1 years if you have professional subscription.
Format: YYYY-MM-DD
to_date: Option<String>
End date for the news articles.
If not specified, it will be today
Format: YYYY-MM-DD
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
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.
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 GetNewsArchiveParams
impl GetNewsArchiveParams
Sourcepub fn default() -> Self
pub fn default() -> Self
Creates a new GetNewsArchiveParams
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
country
:None
category
:None
exclude_category
:None
language
:None
domain
:None
exclude_domain
:None
domain_url
:None
exclude_field
:None
priority_domain
:None
timezone
:None
full_content
:None
image
:None
video
:None
size
:None
page
:None
from_date
:None
to_date
:None
This allows you to easily create a GetNewsArchiveParams
object without having to specify all the parameters manually.