data_for_seo/entity/domain_analytics/technology_stats.rs
1use serde::{Deserialize, Serialize};
2use std::collections::HashMap;
3
4/// Result object for the `technology_stats` endpoint.
5/// See <https://docs.dataforseo.com/v3/domain_analytics/technologies/technology_stats/live/>.
6#[derive(Debug, Default, Serialize, Deserialize, Clone)]
7pub struct DomainAnalyticsApiTechnologyStats {
8 /// Technology name the stats describe.
9 pub technology: Option<String>,
10 /// Start of the requested date range (`yyyy-mm-dd`).
11 pub date_from: Option<String>,
12 /// End of the requested date range (`yyyy-mm-dd`).
13 pub date_to: Option<String>,
14 /// Number of stat snapshots returned in `items`.
15 pub items_count: Option<i64>,
16 /// Adoption snapshots, one per date in the range.
17 pub items: Option<Vec<DomainAnalyticsApiTechnologyStatsItem>>,
18}
19
20/// Technology adoption stats for a single point in time.
21#[derive(Debug, Default, Serialize, Deserialize, Clone)]
22pub struct DomainAnalyticsApiTechnologyStatsItem {
23 /// Result element type, e.g. `technology_stats_item`.
24 #[serde(rename = "type")]
25 pub item_type: Option<String>,
26 /// Date of this snapshot (UTC).
27 pub date: Option<String>,
28 /// Total number of domains using the technology on this date.
29 pub domains_count: Option<i64>,
30 /// Domain count per ISO country code.
31 pub countries: Option<HashMap<String, i64>>,
32 /// Domain count per language code.
33 pub languages: Option<HashMap<String, i64>>,
34 /// Domain count per domain-rank range.
35 pub domains_rank: Option<HashMap<String, i64>>,
36}