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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
//! Data-usage routes (`DataUsageAPI`).
// ------------------------------- data_usage (`DataUsageAPI`) ---------------------------
use ;
use Method;
// ============================================================================================
// Every `DataUsageApi` method in `src/endpoints/data_usage.rs` is built on one of these. All
// twelve Python methods this group ports resolve their network base via
// `resolve_network_url(network_id, parent)` (`data_usage.py:156-157`'s shared `_get_usage`) —
// i.e. they prefer `parent`'s own published `url` over the bare `network_id` template, exactly
// like [`crate::params::resolve_network_url`] — then literal-append a fixed suffix. Each
// constant's `template` is the single source of that suffix: `DataUsageApi`'s private
// `route_url` appends the template text after `{id}` to the resolved network base, so a
// published `url` is never fed back through `Resource::resolve` (which would apply the
// caller-path family check to a link Python only shape-checks).
// ============================================================================================
/// `GET /2.2/networks/{id}/data_usage` — network-wide data-usage statistics.
///
/// Ported from `DataUsageAPI.get_data_usage` (`eero-api src/eero/api/data_usage.py:162-209` at
/// `v8.4.1`; every citation in this file is to that version). `cadence` is **required**
/// (`cadence_required=True`). API-Reference.md:987.
pub const V8_GET_DATA_USAGE: Resource = Resource ;
/// `GET /2.2/networks/{id}/data_usage/breakdown` — data-usage breakdown by category.
///
/// Ported from `DataUsageAPI.get_breakdown` (`data_usage.py:211-253`). `cadence` is optional.
/// API-Reference.md:988.
pub const GET_DATA_USAGE_BREAKDOWN: Resource = Resource ;
/// `GET /2.2/networks/{id}/data_usage/devices` — data-usage statistics for every device on a
/// network (optionally filtered by `profile_id`), and the collection
/// `DataUsageApi::get_device_usage` appends a single validated device id onto.
///
/// Ported from `DataUsageAPI.get_devices_usage` (`data_usage.py:255-302`) and
/// `DataUsageAPI.get_device_usage` (`data_usage.py:304-352`, which literal-appends
/// `/{_validate_child_id(device_mac)}` onto this same collection URL rather than a second
/// `.format()` call — `data_usage.py:343`). `cadence` is optional on the collection form,
/// required on the single-device form. API-Reference.md:989, :990.
pub const GET_DEVICES_DATA_USAGE: Resource = Resource ;
/// `GET /2.2/networks/{id}/data_usage/eeros/summary` — aggregated data-usage summary across
/// every eero on a network.
///
/// Ported from `DataUsageAPI.get_eeros_summary` (`data_usage.py:406-452`). `cadence` is
/// required. API-Reference.md:991.
pub const GET_EEROS_DATA_USAGE_SUMMARY: Resource = Resource ;
/// `GET /2.2/networks/{id}/data_usage/eeros` — data-usage statistics for every eero on a
/// network (`DataUsageApi::get_eeros_usage`), and the collection `DataUsageApi::get_eero_usage`
/// appends a single validated eero id onto.
///
/// Ported from `DataUsageAPI.get_eeros_usage` (`data_usage.py:354-404`, `cadence`
/// required, a path that is not in the observed spec) and `DataUsageAPI.get_eero_usage`
/// (`data_usage.py:454-502`): `.../data_usage/eeros/{_validate_child_id(eero_id)}`. `cadence` is
/// required on both. API-Reference.md:992.
pub const GET_EEROS_DATA_USAGE: Resource = Resource ;
/// `GET /2.2/networks/{id}/data_usage/profiles` — the collection
/// `DataUsageApi::get_profile_usage` appends a single validated profile id onto.
///
/// Ported from `DataUsageAPI.get_profile_usage` (`data_usage.py:504-552`):
/// `.../data_usage/profiles/{_validate_child_id(profile_id)}`. `cadence` is required.
/// API-Reference.md:993.
pub const GET_PROFILES_DATA_USAGE: Resource = Resource ;
/// `GET /2.2/networks/{id}/data_usage/unprofiled/devices` — data-usage statistics for devices
/// with no profile.
///
/// Ported from `DataUsageAPI.get_unprofiled_devices` (`data_usage.py:554-596`). `cadence` is
/// optional. API-Reference.md:994.
pub const GET_UNPROFILED_DEVICES_DATA_USAGE: Resource = Resource ;
/// `GET /2.2/networks/{id}/data_usage/unprofiled/summary` — aggregated data-usage summary for
/// unprofiled devices.
///
/// Ported from `DataUsageAPI.get_unprofiled_summary` (`data_usage.py:598-644`). `cadence` is
/// required. Listed as part of the family in `wiki/API-Reference.md`'s `DataUsageAPI` table (no
/// dedicated numbered bullet).
pub const GET_UNPROFILED_DATA_USAGE_SUMMARY: Resource = Resource ;
/// `GET /2.2/networks/{id}/data_usage/report_settings` — the network's data-usage report
/// settings. No query parameters at all.
///
/// Ported from `DataUsageAPI.get_report_settings` (`data_usage.py:646-670`).
/// API-Reference.md:995 ("No query parameters").
pub const GET_DATA_USAGE_REPORT_SETTINGS: Resource = Resource ;
/// `PUT /2.2/networks/{id}/data_usage/report_settings` — set the network's data-usage report
/// settings.
///
/// Ported from `DataUsageAPI.set_report_settings` (`data_usage.py:672-720`), the only write in
/// this module: JSON body `{"cadence": cadence, "notification_day": notification_day}`
/// (`data_usage.py:719-720`); `cadence` is validated before this crate's own "not authenticated"
/// precondition even runs (`data_usage.py:710`, matched here by validating it before the
/// `Transport::request` call rather than inside it). API-Reference.md:996, unverified write.
pub const SET_DATA_USAGE_REPORT_SETTINGS: Resource = Resource ;