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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! # Chrome for Testing API Client
//!
//! This crate provides programmatic access to "chrome-for-testing" JSON APIs,
//! which are used to retrieve version details and download URLs for `Chrome`, `ChromeDriver`, and
//! Chrome Headless Shell for testing purposes.
//!
//! ## Modules Overview
//!
//! - [`chromedriver`]: `ChromeDriver` specific utilities, such as log level configuration.
//!
//! ## API Endpoints
//!
//! The crate leverages the following JSON API endpoints:
//!
//! - **Last Known Good Versions**:
//! Recent good versions for each release channel (Stable/Beta/Dev/Canary), including `chrome`,
//! `chromedriver`, and `chrome-headless-shell` downloads. Perfect if you just need the "latest
//! stable" version for example.
//!
//! - **Known Good Versions**:
//! All known good versions. Longer API response, not pre-grouped per release channel. Good fit
//! if you have a hardcoded old version that you want to resolve a download URL for. Older
//! entries may omit `chromedriver` and `chrome-headless-shell` downloads.
//!
//! For detailed documentation on these APIs, see the
//! [official Chrome for Testing documentation](https://github.com/GoogleChromeLabs/chrome-for-testing#json-api-endpoints).
//!
//! ## Features
//!
//! - **Ease of Use**: Simplifies interaction with Chrome's testing-related APIs.
//! - **Type-Safe Deserialization**: Automatically maps JSON responses to Rust structs for
//! seamless API interaction.
//! - **Asynchronous Support**: Fully asynchronous.
//!
//! ## Example Usage
//!
//! ```rust,no_run
//! #[tokio::main]
//! async fn main() {
//! use chrome_for_testing::KnownGoodVersions;
//!
//! let client = reqwest::Client::new();
//! match KnownGoodVersions::fetch(&client).await {
//! Ok(data) => println!("Successfully fetched Chrome versions: {data:?}"),
//! Err(e) => println!("Error occurred: {e:?}"),
//! }
//! }
//! ```
/// `ChromeDriver` specific utilities, such as log level configuration.
pub
pub
pub use Download;
pub use DownloadsByPlatform;
pub use HasVersion;
pub use Channel;
pub use ParseChannelError;
pub use Downloads as KnownGoodDownloads;
pub use KnownGoodVersions;
pub use VersionWithoutChannel;
pub use Downloads as LastKnownGoodDownloads;
pub use LastKnownGoodVersions;
pub use VersionInChannel;
pub use ParsePlatformError;
pub use Platform;
pub use ParseVersionError;
pub use Version;
pub use Error;
/// Result type returned by fallible crate APIs.
pub type Result<T, E = Error> = Result;