scrapfly_sdk/result/
account.rs1use serde::Deserialize;
4
5#[derive(Debug, Clone, Deserialize, Default)]
7pub struct AccountData {
8 #[serde(default)]
10 pub account: serde_json::Value,
11 #[serde(default)]
13 pub project: serde_json::Value,
14 #[serde(default)]
16 pub subscription: serde_json::Value,
17}
18
19impl AccountData {
20 pub fn concurrent_limit(&self) -> u32 {
23 self.subscription
24 .pointer("/usage/scrape/concurrent_limit")
25 .and_then(|v| v.as_u64())
26 .map(|v| v as u32)
27 .unwrap_or(0)
28 }
29}
30
31#[derive(Debug, Clone, Deserialize, Default)]
33pub struct VerifyApiKeyResult {
34 #[serde(default)]
36 pub valid: bool,
37}