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
//! Device-blacklist routes (`BlacklistAPI`).
// ------------------------------ blacklist (`BlacklistAPI`) -----------------------------
use ;
use Method;
// ============================================================================================
// v8.0.4 constants. Every `BlacklistApi` method in
// `src/endpoints/blacklist.rs` is built on one of these.
// ============================================================================================
/// `GET /2.2/networks/{id}/blacklist` — list blacklisted (blocked) devices, preferring the
/// network's own published `device_blacklist` link when a `parent` envelope is supplied.
///
/// Ported from `BlacklistAPI._blacklist_url` (`eero-api src/eero/api/blacklist.py:53-70` at
/// `v8.0.4`): `sub_resource_url(network, "networks/{id}/blacklist",
/// link=DEVICE_BLACKLIST_LINK, parent=as_envelope(parent), version=API_VERSION_DEFAULT)`, where
/// `DEVICE_BLACKLIST_LINK = "device_blacklist"` (`blacklist.py:32`). Used by
/// `BlacklistApi::get_blacklist`, `BlacklistApi::add_to_blacklist` (different HTTP method — see
/// [`V8_ADD_TO_BLACKLIST`]) and `BlacklistApi::remove_from_blacklist` (as the base this route's
/// `resolve` result is fed through [`crate::links::child_url`]). API-Reference.md:851, read.
pub const V8_GET_BLACKLIST: Resource = Resource ;
/// `POST /2.2/networks/{id}/blacklist` — add a device (by MAC) to the blacklist, via a
/// **form-encoded** `mac` field (not JSON).
///
/// Ported from `BlacklistAPI.add_to_blacklist` (`blacklist.py:98-135` at `v8.4.1`): same URL
/// resolution as [`V8_GET_BLACKLIST`], `data={"mac": mac}` (`blacklist.py:135`). A verified
/// write (2026-10-06, form-encoded `mac`): the endpoint logs no uncharacterised-write warning.
pub const V8_ADD_TO_BLACKLIST: Resource = Resource ;
// `BlacklistAPI.remove_from_blacklist` (`blacklist.py:139-166`) has no route constant of its
// own: it resolves [`V8_GET_BLACKLIST`] for the collection URL, then appends `mac_or_device_id`
// via `child_url` (`links.py:280-298`), which validates it as a single path-segment identifier
// *before* any request is sent (`_validate_identifier` — `links.py:47-76`) — see
// `BlacklistApi::remove_from_blacklist`'s own docs.