google-analytics-api-ga4 0.2.0

Async Rust client for the Google Analytics 4 (GA4) Data API v1beta: runReport, realtime reports, pivot reports, and metadata
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::types::RunReportResponse;
use crate::RunReportRequest;
use serde::{Deserialize, Serialize};

#[derive(Default, Debug, Serialize, Deserialize)]
pub(crate) struct BatchRunReportsRequestBody {
    pub requests: Vec<RunReportRequest>,
}

/// <https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/batchRunReports>
#[derive(Default, Debug, Serialize, Deserialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct BatchRunReportsResponse {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub reports: Option<Vec<RunReportResponse>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
}