1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! # newsapi-rust
//!
//! A robust, async Rust client for the [NewsAPI.org](https://newsapi.org/) news aggregator API.
//!
//! This library provides a type-safe, async interface to all NewsAPI v2 endpoints:
//! - `/top-headlines` - get breaking news headlines
//! - `/everything` - search millions of articles
//! - `/sources` - discover available news sources
//!
//! ## Quick Start
//!
//! Add to your `Cargo.toml`
//! ```toml
//! [dependencies]
//! newsapi-rust = "0.1"
//! tokio = { version = "1.0", features = ["full"] }
//! ```
//!
//! Then:
//! ```no_run
//! use newsapi_rust::{NewsApiClient, ApiVersion};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let client = NewsApiClient::new("YOUR_API_KEY", ApiVersion::V2);
//! let params = TopHeadlinesParams::new()
//! .country("us")
//! .category("technology");
//! let response = client.top_headlines(¶ms).await?;
//! for article in response.articles {
//! println!("{} - {}", article.title, article.url);
//! }
//! Ok(())
//! }
//! ```
// Ensure all public items are documented
pub use NewsApiClient;
pub use ;
pub use ;
pub use ;
pub use ApiVersion;