Skip to main content

steel/
lib.rs

1//! Steel API client
2
3pub mod client;
4pub mod pagination;
5pub mod resources;
6pub mod types;
7
8pub use client::{ApiError, Error, Steel};
9pub use pagination::Page;
10pub use types::*;
11
12#[cfg(test)]
13mod tests {
14    #[allow(unused_imports)]
15    use crate::*;
16
17    #[test]
18    fn builds_client() {
19        let _ = Steel::new("test-key");
20    }
21
22    #[test]
23    fn enums_accept_unknown_values() {
24        let _: ProfileStatus =
25            serde_json::from_str("\"zz_unknown_zz\"").expect("ProfileStatus forward-compat");
26        let _: ScrapeRequestFormatItem = serde_json::from_str("\"zz_unknown_zz\"")
27            .expect("ScrapeRequestFormatItem forward-compat");
28        let _: SessionCostResponseCurrency = serde_json::from_str("\"zz_unknown_zz\"")
29            .expect("SessionCostResponseCurrency forward-compat");
30        let _: SessionCostResponseUnit = serde_json::from_str("\"zz_unknown_zz\"")
31            .expect("SessionCostResponseUnit forward-compat");
32        let _: SessionResponseProxySource = serde_json::from_str("\"zz_unknown_zz\"")
33            .expect("SessionResponseProxySource forward-compat");
34        let _: SessionResponseRegion = serde_json::from_str("\"zz_unknown_zz\"")
35            .expect("SessionResponseRegion forward-compat");
36        let _: SessionResponseReleaseReason = serde_json::from_str("\"zz_unknown_zz\"")
37            .expect("SessionResponseReleaseReason forward-compat");
38        let _: SessionResponseStatus = serde_json::from_str("\"zz_unknown_zz\"")
39            .expect("SessionResponseStatus forward-compat");
40        let _: ComputerActionRequestClickMouseButton = serde_json::from_str("\"zz_unknown_zz\"")
41            .expect("ComputerActionRequestClickMouseButton forward-compat");
42        let _: ComputerActionRequestClickMouseClickType = serde_json::from_str("\"zz_unknown_zz\"")
43            .expect("ComputerActionRequestClickMouseClickType forward-compat");
44        let _: CreateSessionRequestDeviceConfigDevice = serde_json::from_str("\"zz_unknown_zz\"")
45            .expect("CreateSessionRequestDeviceConfigDevice forward-compat");
46        let _: CreateSessionRequestSessionContextCookiesItemPriority =
47            serde_json::from_str("\"zz_unknown_zz\"")
48                .expect("CreateSessionRequestSessionContextCookiesItemPriority forward-compat");
49        let _: CreateSessionRequestSessionContextCookiesItemSameSite =
50            serde_json::from_str("\"zz_unknown_zz\"")
51                .expect("CreateSessionRequestSessionContextCookiesItemSameSite forward-compat");
52        let _: CreateSessionRequestSessionContextCookiesItemSourceScheme =
53            serde_json::from_str("\"zz_unknown_zz\"")
54                .expect("CreateSessionRequestSessionContextCookiesItemSourceScheme forward-compat");
55        let _: CreateSessionRequestUseProxyGeolocationCity =
56            serde_json::from_str("\"zz_unknown_zz\"")
57                .expect("CreateSessionRequestUseProxyGeolocationCity forward-compat");
58        let _: CreateSessionRequestUseProxyGeolocationCountry =
59            serde_json::from_str("\"zz_unknown_zz\"")
60                .expect("CreateSessionRequestUseProxyGeolocationCountry forward-compat");
61        let _: CreateSessionRequestUseProxyGeolocationState =
62            serde_json::from_str("\"zz_unknown_zz\"")
63                .expect("CreateSessionRequestUseProxyGeolocationState forward-compat");
64        let _: SessionCostResponseUsageBrowserUnit = serde_json::from_str("\"zz_unknown_zz\"")
65            .expect("SessionCostResponseUsageBrowserUnit forward-compat");
66    }
67}