Skip to main content

EeroClient

Struct EeroClient 

Source
pub struct EeroClient { /* private fields */ }
Expand description

Client for the eero WiFi router API.

Implementations§

Source§

impl EeroClient

Source

pub async fn get_account(&self) -> Result<Account>

Get the authenticated user’s account information.

Source§

impl EeroClient

Source

pub async fn get_activity(&self, network_id: u64) -> Result<ActivitySummary>

Get network activity summary (requires eero Plus).

Source

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

Source

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

pub async fn verify(&self, code: &str) -> Result<()>

Complete login by verifying the code sent to the user’s device.

On success, the session token is extracted from the response cookies and stored in the credential store.

Source

pub async fn logout(&self) -> Result<()>

Log out and clear stored credentials.

Source§

impl EeroClient

Source

pub async fn get_devices(&self, network_id: u64) -> Result<Vec<Device>>

List all devices on a network.

Source

pub async fn get_device(&self, device_url: &str) -> Result<Device>

Get a specific device by its resource URL.

Source

pub async fn update_device( &self, device_url: &str, update: &DeviceUpdate, ) -> Result<Device>

Update a device (nickname, blocked, paused, profile assignment).

Source§

impl EeroClient

Source

pub async fn get_diagnostics(&self, network_id: u64) -> Result<DiagnosticReport>

Get the latest diagnostic report for a network.

Source

pub async fn run_diagnostics(&self, network_id: u64) -> Result<DiagnosticReport>

Run a new diagnostic check on the network.

Source§

impl EeroClient

Source

pub async fn get_eeros(&self, network_id: u64) -> Result<Vec<EeroNode>>

List all eero nodes on a network.

Source

pub async fn get_eero(&self, eero_url: &str) -> Result<EeroNode>

Get a specific eero node by its resource URL.

Source

pub async fn update_eero( &self, eero_url: &str, update: &EeroUpdate, ) -> Result<EeroNode>

Update an eero node (location, LED, nightlight settings).

Source

pub async fn reboot_eero(&self, eero_url: &str) -> Result<Value>

Reboot a specific eero node.

Source§

impl EeroClient

Source

pub async fn get_port_forwards( &self, network_id: u64, ) -> Result<Vec<PortForward>>

List all port forwards on a network.

Source

pub async fn create_port_forward( &self, network_id: u64, forward: &NewPortForward, ) -> Result<PortForward>

Create a new port forward.

Source

pub async fn delete_port_forward(&self, forward_url: &str) -> Result<Value>

Delete a port forward by its resource URL.

Source§

impl EeroClient

Source

pub async fn get_network(&self, network_id: u64) -> Result<Network>

Get network details by network ID.

Source

pub async fn get_network_by_url(&self, url: &str) -> Result<Network>

Get network details by resource URL.

Source

pub async fn update_network( &self, network_id: u64, update: &NetworkUpdate, ) -> Result<Network>

Update network settings.

Source

pub async fn reboot_network(&self, network_id: u64) -> Result<Value>

Reboot the entire network.

Source

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.

Source

pub async fn get_speed_test(&self, network_id: u64) -> Result<Vec<SpeedTest>>

Get the latest speed test result.

Source

pub async fn get_guest_network(&self, network_id: u64) -> Result<GuestNetwork>

Get guest network settings.

Source

pub async fn update_guest_network( &self, network_id: u64, update: &GuestNetworkUpdate, ) -> Result<GuestNetwork>

Update guest network settings.

Source§

impl EeroClient

Source

pub async fn get_profiles(&self, network_id: u64) -> Result<Vec<Profile>>

List all profiles on a network.

Source

pub async fn get_profile(&self, profile_url: &str) -> Result<Profile>

Get a specific profile by its resource URL.

Source

pub async fn update_profile( &self, profile_url: &str, update: &ProfileUpdate, ) -> Result<Profile>

Update a profile (parental controls, schedule, DNS policies).

Source§

impl EeroClient

Source

pub fn new() -> Result<Self>

Create a new client with default settings.

Source

pub fn credentials(&self) -> &dyn CredentialStore

Access the credential store.

Source

pub fn unwrap_response<T>(response: ApiResponse<T>) -> Result<T>

Extract response data, returning an error for non-success status codes.

Source

pub fn http_client(&self) -> &Client

Access the raw reqwest HTTP client (for advanced use cases).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more