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
//! Thread (smart-home mesh) routes (`ThreadAPI`), v8.0.4.
//!
//! Ported from `eero-api src/eero/api/thread.py` at v8.0.4. Per that module's own docstring
//! (`thread.py:6-11`): the read goes through the network's published `thread` link, like every
//! other sub-resource ([`GET_THREAD`], `link: Some("thread")`); every write targets the
//! **literal** `networks/{id}/thread` path directly, never through a published link — `parent`
//! is accepted by every Python write method for signature consistency with the rest of this
//! family, but is documented "Unused" and never consulted (`thread.py:88-89`). [`PUT_THREAD`]/
//! [`POST_THREAD`] below model that with `link: None`: [`Resource::resolve`] falls straight to
//! [`crate::links::resource_url`] whenever `link` is `None`, ignoring whatever `parent` a caller
//! passes — the exact "accepted but inert" behaviour the Python source calls out. A port must
//! resist "fixing" this into a `link`-preferring route for consistency with the rest of the
//! crate; the asymmetry is upstream-declared, not an oversight (g5 brief §3.5).
use ;
use Method;
/// `GET /2.2/networks/{id}/thread` — Thread (smart-home mesh) status, preferring the network's
/// published `thread` link when a `parent` envelope carries one.
///
/// Ported from `eero-api src/eero/api/thread.py:40-66` (`ThreadAPI.get_thread`).
pub const GET_THREAD: Resource = Resource ;
/// `PUT /2.2/networks/{id}/thread` — the literal Thread path, shared by `set_thread_enabled` and
/// `update_thread`. `parent` is never consulted — see the module docs.
///
/// Ported from `eero-api src/eero/api/thread.py:70-103` (`ThreadAPI.set_thread_enabled`) and
/// `thread.py:105-159` (`ThreadAPI.update_thread`), which resolve via the identical
/// `resource_url(network_id, "networks/{id}/thread")` call.
pub const PUT_THREAD: Resource = Resource ;
/// `POST /2.2/networks/{id}/thread` — the literal Thread path, for credential regeneration.
/// `parent` is never consulted — see the module docs.
///
/// Ported from `eero-api src/eero/api/thread.py:161-186`
/// (`ThreadAPI.regenerate_thread_credentials`).
pub const POST_THREAD: Resource = Resource ;