chrome_for_testing/lib.rs
1//! # Chrome for Testing API Client
2//!
3//! This crate provides programmatic access to "chrome-for-testing" JSON APIs,
4//! which are used to retrieve version details and other relevant information about
5//! Chrome and ChromeDriver for testing purposes.
6//!
7//! ## Modules Overview
8//!
9//! - [`api`]: Contains the core functionality to interact with the API endpoints.
10//! - [`chromedriver`]: Facilitates interaction with ChromeDriver-specific data and operations.
11//!
12//! ## API Endpoints
13//!
14//! The crate leverages the following JSON API endpoints:
15//! - **Known Good Versions**: Provides a list of known good versions of Chrome.
16//! - **Last Known Good Versions**: Retrieves the last known good version of Chrome.
17//!
18//! For detailed documentation on these APIs, see the
19//! [official Chrome for Testing documentation](https://github.com/GoogleChromeLabs/chrome-for-testing#json-api-endpoints).
20//!
21//! ## Features
22//!
23//! - **Ease of Use**: Simplifies interaction with Chrome's testing-related APIs.
24//! - **Type-Safe Deserialization**: Automatically maps JSON responses to Rust structs for
25//! seamless API interaction.
26//! - **Asynchronous Support**: Fully asynchronous using the `tokio` runtime.
27//!
28//! ## Example Usage
29//!
30//! ```rust
31//! #[tokio::main]
32//! async fn main() {
33//! use chrome_for_testing::api::known_good_versions::KnownGoodVersions;
34//!
35//! let client = reqwest::Client::new();
36//! match KnownGoodVersions::fetch(client).await {
37//! Ok(data) => println!("Successfully fetched Chrome versions: {:?}", data),
38//! Err(e) => println!("Error occurred: {}", e),
39//! }
40//! }
41//! ```
42
43/// Chrome for Testing API types and functions for fetching version information.
44pub mod api;
45
46/// ChromeDriver specific utilities, such as log level configuration.
47pub mod chromedriver;
48
49/// Error types used throughout the crate.
50pub mod error;