pub struct EeroClient { /* private fields */ }Expand description
Client for the eero WiFi router API.
Implementations§
Source§impl EeroClient
impl EeroClient
Sourcepub async fn get_account(&self) -> Result<Account>
pub async fn get_account(&self) -> Result<Account>
Get the authenticated user’s account information.
Source§impl EeroClient
impl EeroClient
Sourcepub async fn get_activity(&self, network_id: u64) -> Result<ActivitySummary>
pub async fn get_activity(&self, network_id: u64) -> Result<ActivitySummary>
Get network activity summary (requires eero Plus).
Sourcepub async fn get_client_activity(
&self,
device_url: &str,
) -> Result<ClientActivity>
pub async fn get_client_activity( &self, device_url: &str, ) -> Result<ClientActivity>
Get activity for a specific client/device (requires eero Plus).
Source§impl EeroClient
impl EeroClient
Sourcepub async fn login(&self, login: &str) -> Result<LoginResponse>
pub async fn login(&self, login: &str) -> Result<LoginResponse>
Begin login by sending a verification code to the user’s email or phone.
After calling this, the user will receive a verification code. Call
verify with that code to complete authentication.
Source§impl EeroClient
impl EeroClient
Sourcepub async fn get_devices(&self, network_id: u64) -> Result<Vec<Device>>
pub async fn get_devices(&self, network_id: u64) -> Result<Vec<Device>>
List all devices on a network.
Sourcepub async fn get_device(&self, device_url: &str) -> Result<Device>
pub async fn get_device(&self, device_url: &str) -> Result<Device>
Get a specific device by its resource URL.
Sourcepub async fn update_device(
&self,
device_url: &str,
update: &DeviceUpdate,
) -> Result<Device>
pub async fn update_device( &self, device_url: &str, update: &DeviceUpdate, ) -> Result<Device>
Update a device (nickname, blocked, paused, profile assignment).
Source§impl EeroClient
impl EeroClient
Sourcepub async fn get_diagnostics(&self, network_id: u64) -> Result<DiagnosticReport>
pub async fn get_diagnostics(&self, network_id: u64) -> Result<DiagnosticReport>
Get the latest diagnostic report for a network.
Sourcepub async fn run_diagnostics(&self, network_id: u64) -> Result<DiagnosticReport>
pub async fn run_diagnostics(&self, network_id: u64) -> Result<DiagnosticReport>
Run a new diagnostic check on the network.
Source§impl EeroClient
impl EeroClient
Sourcepub async fn get_eeros(&self, network_id: u64) -> Result<Vec<EeroNode>>
pub async fn get_eeros(&self, network_id: u64) -> Result<Vec<EeroNode>>
List all eero nodes on a network.
Sourcepub async fn get_eero(&self, eero_url: &str) -> Result<EeroNode>
pub async fn get_eero(&self, eero_url: &str) -> Result<EeroNode>
Get a specific eero node by its resource URL.
Sourcepub async fn update_eero(
&self,
eero_url: &str,
update: &EeroUpdate,
) -> Result<EeroNode>
pub async fn update_eero( &self, eero_url: &str, update: &EeroUpdate, ) -> Result<EeroNode>
Update an eero node (location, LED, nightlight settings).
Sourcepub async fn reboot_eero(&self, eero_url: &str) -> Result<Value>
pub async fn reboot_eero(&self, eero_url: &str) -> Result<Value>
Reboot a specific eero node.
Source§impl EeroClient
impl EeroClient
Sourcepub async fn get_port_forwards(
&self,
network_id: u64,
) -> Result<Vec<PortForward>>
pub async fn get_port_forwards( &self, network_id: u64, ) -> Result<Vec<PortForward>>
List all port forwards on a network.
Sourcepub async fn create_port_forward(
&self,
network_id: u64,
forward: &NewPortForward,
) -> Result<PortForward>
pub async fn create_port_forward( &self, network_id: u64, forward: &NewPortForward, ) -> Result<PortForward>
Create a new port forward.
Sourcepub async fn delete_port_forward(&self, forward_url: &str) -> Result<Value>
pub async fn delete_port_forward(&self, forward_url: &str) -> Result<Value>
Delete a port forward by its resource URL.
Source§impl EeroClient
impl EeroClient
Sourcepub async fn get_network(&self, network_id: u64) -> Result<Network>
pub async fn get_network(&self, network_id: u64) -> Result<Network>
Get network details by network ID.
Sourcepub async fn get_network_by_url(&self, url: &str) -> Result<Network>
pub async fn get_network_by_url(&self, url: &str) -> Result<Network>
Get network details by resource URL.
Sourcepub async fn update_network(
&self,
network_id: u64,
update: &NetworkUpdate,
) -> Result<Network>
pub async fn update_network( &self, network_id: u64, update: &NetworkUpdate, ) -> Result<Network>
Update network settings.
Sourcepub async fn reboot_network(&self, network_id: u64) -> Result<Value>
pub async fn reboot_network(&self, network_id: u64) -> Result<Value>
Reboot the entire network.
Sourcepub async fn run_speed_test(&self, network_id: u64) -> Result<Value>
pub async fn run_speed_test(&self, network_id: u64) -> Result<Value>
Run a speed test on the network.
Returns serde_json::Value because the API may return 202 Accepted
with no data body.
Sourcepub async fn get_speed_test(&self, network_id: u64) -> Result<Vec<SpeedTest>>
pub async fn get_speed_test(&self, network_id: u64) -> Result<Vec<SpeedTest>>
Get the latest speed test result.
Sourcepub async fn get_guest_network(&self, network_id: u64) -> Result<GuestNetwork>
pub async fn get_guest_network(&self, network_id: u64) -> Result<GuestNetwork>
Get guest network settings.
Sourcepub async fn update_guest_network(
&self,
network_id: u64,
update: &GuestNetworkUpdate,
) -> Result<GuestNetwork>
pub async fn update_guest_network( &self, network_id: u64, update: &GuestNetworkUpdate, ) -> Result<GuestNetwork>
Update guest network settings.
Source§impl EeroClient
impl EeroClient
Sourcepub async fn get_profiles(&self, network_id: u64) -> Result<Vec<Profile>>
pub async fn get_profiles(&self, network_id: u64) -> Result<Vec<Profile>>
List all profiles on a network.
Sourcepub async fn get_profile(&self, profile_url: &str) -> Result<Profile>
pub async fn get_profile(&self, profile_url: &str) -> Result<Profile>
Get a specific profile by its resource URL.
Sourcepub async fn update_profile(
&self,
profile_url: &str,
update: &ProfileUpdate,
) -> Result<Profile>
pub async fn update_profile( &self, profile_url: &str, update: &ProfileUpdate, ) -> Result<Profile>
Update a profile (parental controls, schedule, DNS policies).
Source§impl EeroClient
impl EeroClient
Sourcepub fn credentials(&self) -> &dyn CredentialStore
pub fn credentials(&self) -> &dyn CredentialStore
Access the credential store.
Sourcepub fn unwrap_response<T>(response: ApiResponse<T>) -> Result<T>
pub fn unwrap_response<T>(response: ApiResponse<T>) -> Result<T>
Extract response data, returning an error for non-success status codes.
Sourcepub fn http_client(&self) -> &Client
pub fn http_client(&self) -> &Client
Access the raw reqwest HTTP client (for advanced use cases).