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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//! # screenshotfreeapi
//!
//! Official Rust client for the [ScreenshotFreeAPI](https://screenshotfreeapi.com) — a
//! production-grade Screenshot-as-a-Service platform.
//!
//! ## Quick start
//!
//! Add to `Cargo.toml`:
//!
//! ```toml
//! [dependencies]
//! screenshotfreeapi = "1"
//! tokio = { version = "1", features = ["full"] }
//! ```
//!
//! ```rust,no_run
//! use screenshotfreeapi::ScreenshotFreeAPIClient;
//!
//! #[tokio::main]
//! async fn main() -> screenshotfreeapi::Result<()> {
//! let client = ScreenshotFreeAPIClient::new("sfa_your_api_key");
//! let result = client.capture("https://stripe.com").await?;
//! println!("{}", result.screenshots[0].url);
//! Ok(())
//! }
//! ```
//!
//! ## Resources
//!
//! Access each group of endpoints through the corresponding field on [`ScreenshotFreeAPIClient`]:
//!
//! - `client.auth` — account registration and JWT management
//! - `client.screenshots` — enqueue web, mobile, and HTML captures
//! - `client.jobs` — poll status, fetch results
//! - `client.billing` — plans, usage, upgrades
//! - `client.workspaces` — team workspaces and member management
//! - `client.monitors` — scheduled app-capture monitors
//! - `client.integrations` — Zapier REST Hooks
//!
//! ## Webhook verification
//!
//! ```rust
//! use screenshotfreeapi::verify_webhook_signature;
//!
//! let body = br#"{"jobId":"abc","status":"completed"}"#;
//! let sig = "the-value-of-X-ScreenshotFree-Signature-header";
//! let secret = "your_webhook_secret";
//!
//! if verify_webhook_signature(body, sig, secret).is_ok() {
//! // safe to process
//! }
//! ```
// ---------------------------------------------------------------------------
// Public re-exports
// ---------------------------------------------------------------------------
pub use ScreenshotFreeAPIClient;
pub use ;
pub use ;
pub use WaitOptions;
pub use verify_webhook_signature;