eero

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package eero provides a Go client for the eero router REST API.

Index

Constants

View Source
const (
	// DefaultBaseURL is the base URL for the eero API.
	DefaultBaseURL = "https://api-user.e2ro.com/2.2"

	// DefaultUserAgent mimics the eero iOS app.
	DefaultUserAgent = "eero/3.0 (iPhone; iOS 17.0)"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	// HTTPStatusCode is the HTTP status code of the response.
	HTTPStatusCode int `json:"-"`
	// Code is the API-level status code from the "meta" envelope.
	Code int `json:"code"`
	// Message is the human-readable error message from the API.
	Message string `json:"error"`
	// ServerTime is the server timestamp from the "meta" envelope.
	ServerTime string `json:"server_time"`
}

APIError represents an error returned by the eero API. Eero responses include a "meta" envelope with a status code and optional error message. This struct captures both the HTTP-level and API-level error information.

func (*APIError) Error

func (e *APIError) Error() string

Error implements the error interface.

func (*APIError) IsAuthError

func (e *APIError) IsAuthError() bool

IsAuthError reports whether the API error indicates an authentication failure.

type Account

type Account struct {
	Name                      string          `json:"name"`
	Phone                     AccountPhone    `json:"phone"`
	Email                     AccountEmail    `json:"email"`
	LogID                     string          `json:"log_id"`
	OrganizationID            *string         `json:"organization_id"`
	ImageAssets               any             `json:"image_assets"`
	Networks                  AccountNetworks `json:"networks"`
	Auth                      AccountAuth     `json:"auth"`
	Role                      string          `json:"role"`
	IsBetaBugReporterEligible bool            `json:"is_beta_bug_reporter_eligible"`
	ReportIssue               ReportIssue     `json:"report_issue"`
	CanTransfer               bool            `json:"can_transfer"`
	IsOwner                   bool            `json:"is_owner"`
	IsPremiumCapable          bool            `json:"is_premium_capable"`
	PaymentFailed             bool            `json:"payment_failed"`
	PremiumStatus             string          `json:"premium_status"`
	PremiumDetails            PremiumDetails  `json:"premium_details"`
	PushSettings              PushSettings    `json:"push_settings"`
	TrustCertificatesEtag     string          `json:"trust_certificates_etag"`
	Consents                  Consents        `json:"consents"`
	CanMigrateToAmazonLogin   bool            `json:"can_migrate_to_amazon_login"`
	EeroForBusiness           bool            `json:"eero_for_business"`
	MduProgram                bool            `json:"mdu_program"`
	BusinessDetails           any             `json:"business_details"`
}

Account represents the authenticated user's eero account, including the list of networks they have access to.

type AccountAuth added in v1.1.0

type AccountAuth struct {
	Type       string  `json:"type"`
	ProviderID *string `json:"provider_id"`
	ServiceID  *string `json:"service_id"`
}

AccountAuth represents the auth details for the account.

type AccountEmail

type AccountEmail struct {
	Value    string `json:"value"`
	Verified bool   `json:"verified"`
}

AccountEmail holds email-related account fields.

type AccountNetworks

type AccountNetworks struct {
	Count int              `json:"count"`
	Data  []NetworkSummary `json:"data"`
}

AccountNetworks holds the network count and the list of network references.

type AccountPhone added in v1.0.0

type AccountPhone struct {
	Value          string `json:"value"`
	CountryCode    string `json:"country_code"`
	NationalNumber string `json:"national_number"`
	Verified       bool   `json:"verified"`
}

AccountPhone holds phone-related account fields.

type AccountService

type AccountService struct {
	// contains filtered or unexported fields
}

AccountService provides access to the authenticated user's eero account.

func (*AccountService) Get

func (s *AccountService) Get(ctx context.Context) (*Account, error)

Get retrieves the authenticated user's account information, including the list of networks they have access to.

The returned Account.Networks.Data entries contain a URL field (e.g., "/2.2/networks/12345") that can be passed directly to NetworkService.Get and DeviceService.List.

type AdBlockSettings added in v1.1.0

type AdBlockSettings struct {
	Enabled bool `json:"enabled"`
}

AdBlockSettings enables custom domains blocks and specific rules.

type AuthService

type AuthService struct {
	// contains filtered or unexported fields
}

AuthService handles authentication against the eero API. The login flow is a two-step process:

  1. Login sends an identifier (email or phone) and receives a user_token.
  2. Verify sends the verification code (received via email/SMS) to complete authentication and activate the session.

func (*AuthService) Login

func (s *AuthService) Login(ctx context.Context, identifier string) (*LoginResponse, error)

Login initiates the authentication challenge by sending an email address or phone number. Eero will send a verification code to the provided identifier. The returned user_token is automatically stored on the client and set as the session cookie for subsequent requests.

func (*AuthService) Verify

func (s *AuthService) Verify(ctx context.Context, verificationCode string) error

Verify completes the two-step authentication by sending the verification code that was delivered to the user's email or phone. After a successful verification, the session cookie is fully activated and all subsequent API calls will be authenticated.

type Client

type Client struct {
	// HTTPClient handles requests and secure cookie jar persistence.
	// The session cookie state is managed internally by the jar, making
	// it safe for concurrent use across Goroutines.
	HTTPClient *http.Client

	// BaseURL is the root URL for all API requests.
	BaseURL string

	// UserAgent is the User-Agent header sent with every request.
	UserAgent string

	// Services — each service hangs off the client.
	Auth    *AuthService
	Account *AccountService
	Network *NetworkService
	Device  *DeviceService
	Profile *ProfileService
	// contains filtered or unexported fields
}

Client is the top-level eero API client. It holds the HTTP client (with a cookie jar for automatic session management), the base URL, and references to each service.

func NewClient

func NewClient() (*Client, error)

NewClient creates a new eero API client with sensible defaults. The returned client uses a cookie jar for transparent session management and is secured against resource leaks and open-redirect cookie theft.

func (*Client) SetSessionCookie

func (c *Client) SetSessionCookie(userToken string) error

SetSessionCookie programmatically sets the eero session cookie on the client's cookie jar. This is useful when restoring a previously obtained user_token without going through the full login flow. The underlying cookiejar executes safely across concurrent Goroutines.

type Consents added in v1.1.0

type Consents struct {
	MarketingEmails MarketingEmailsConsent `json:"marketing_emails"`
}

Consents holds user consent preferences.

type DNSParent added in v1.1.0

type DNSParent struct {
	IPs []string `json:"ips"`
}

DNSParent holds DNS configuration properties mapping.

type DNSPolicies added in v1.1.0

type DNSPolicies struct {
	BlockMalware bool `json:"block_malware"`
	AdBlock      bool `json:"ad_block"`
}

DNSPolicies determines whether advanced blockers map through.

type Device

type Device struct {
	URL                      string             `json:"url"`
	MAC                      string             `json:"mac"`
	EUI64                    string             `json:"eui64"`
	Manufacturer             *string            `json:"manufacturer"`
	IP                       *string            `json:"ip"`
	IPs                      []string           `json:"ips"`
	IPv6Addresses            []IPv6Address      `json:"ipv6_addresses"`
	Nickname                 *string            `json:"nickname"`
	Hostname                 *string            `json:"hostname"`
	Connected                bool               `json:"connected"`
	Wireless                 bool               `json:"wireless"`
	ConnectionType           string             `json:"connection_type"`
	Source                   DeviceSource       `json:"source"`
	LastActive               EeroTime           `json:"last_active"`
	FirstActive              EeroTime           `json:"first_active"`
	Connectivity             DeviceConnectivity `json:"connectivity"`
	Interface                DeviceInterface    `json:"interface"`
	Usage                    *Usage             `json:"usage"`
	Profile                  DeviceRef          `json:"profile"`
	DeviceType               string             `json:"device_type"`
	Blacklisted              bool               `json:"blacklisted"`
	Dropped                  bool               `json:"dropped"`
	Homekit                  Homekit            `json:"homekit"`
	IsGuest                  bool               `json:"is_guest"`
	Paused                   bool               `json:"paused"`
	Channel                  int                `json:"channel"`
	Auth                     string             `json:"auth"`
	IsPrivate                bool               `json:"is_private"`
	SecondaryWanDenyAccess   bool               `json:"secondary_wan_deny_access"`
	RingLTE                  RingLTE            `json:"ring_lte"`
	IPv4                     string             `json:"ipv4"`
	IsProxiedNode            bool               `json:"is_proxied_node"`
	ManufacturerDeviceTypeID *string            `json:"manufacturer_device_type_id"`
	AmazonDevicesDetail      any                `json:"amazon_devices_detail"`
	SSID                     string             `json:"ssid"`
	SubnetKind               string             `json:"subnet_kind"`
	VlanID                   *int               `json:"vlan_id"`
	VlanName                 string             `json:"vlan_name"`
	DisplayName              *string            `json:"display_name"`
	ModelName                *string            `json:"model_name"`
}

Device represents a single client device connected to the eero network. Optional fields that the API may omit for offline devices use pointer types so that missing JSON keys decode to nil rather than zero values.

type DeviceConnectivity added in v1.1.0

type DeviceConnectivity struct {
	RxBitrate      string         `json:"rx_bitrate"`
	Signal         string         `json:"signal"`
	SignalAvg      *string        `json:"signal_avg"`
	Score          float64        `json:"score"`
	ScoreBars      int            `json:"score_bars"`
	Frequency      int            `json:"frequency"`
	RxRateInfo     RateInfo       `json:"rx_rate_info"`
	TxRateInfo     RateInfo       `json:"tx_rate_info"`
	EthernetStatus EthernetStatus `json:"ethernet_status"`
}

DeviceConnectivity holds wireless performance ratings for connected nodes.

type DeviceInterface added in v1.1.0

type DeviceInterface struct {
	Frequency     string `json:"frequency"`
	FrequencyUnit string `json:"frequency_unit"`
}

DeviceInterface captures what frequencies the node represents over transmission.

type DeviceRef

type DeviceRef struct {
	URL  string `json:"url"`
	Name string `json:"name"`
}

DeviceRef is a lightweight reference to a profile from within a device.

type DeviceService

type DeviceService struct {
	// contains filtered or unexported fields
}

DeviceService provides access to devices connected to an eero network.

func (*DeviceService) List

func (s *DeviceService) List(ctx context.Context, networkURL string) ([]Device, error)

List returns all devices connected to the specified network.

The networkURL parameter should be the exact relative URL from the account response (e.g., "/2.2/networks/12345"). The "/devices" suffix is appended automatically.

The response is unmarshaled into EeroResponse[[]Device], but only the []Device slice is returned to the caller.

type DeviceSource added in v1.0.0

type DeviceSource struct {
	Location     string `json:"location"`
	IsGateway    bool   `json:"is_gateway"`
	Model        string `json:"model"`
	DisplayName  string `json:"display_name"`
	SerialNumber string `json:"serial_number"`
	URL          string `json:"url"`
}

DeviceSource holds information about what eero node this device is connected to.

type EeroNode

type EeroNode struct {
	URL                   string        `json:"url"`
	Serial                string        `json:"serial"`
	Location              string        `json:"location"`
	Joined                EeroTime      `json:"joined"`
	Gateway               bool          `json:"gateway"`
	IPAddress             string        `json:"ip_address"`
	Status                string        `json:"status"`
	Model                 string        `json:"model"`
	ModelNumber           string        `json:"model_number"`
	EthernetAddresses     []string      `json:"ethernet_addresses"`
	WifiBSSIDs            []string      `json:"wifi_bssids"`
	UpdateAvailable       bool          `json:"update_available"`
	OS                    string        `json:"os"`
	OSVersion             string        `json:"os_version"`
	MeshQualityBars       int           `json:"mesh_quality_bars"`
	Wired                 bool          `json:"wired"`
	LedOn                 bool          `json:"led_on"`
	UsingWan              bool          `json:"using_wan"`
	IsPrimaryNode         bool          `json:"is_primary_node"`
	MACAddress            string        `json:"mac_address"`
	IPv6Addresses         []IPv6Address `json:"ipv6_addresses"`
	ConnectedClientsCount int           `json:"connected_clients_count"`
	HeartbeatOK           bool          `json:"heartbeat_ok"`
	LastHeartbeat         time.Time     `json:"last_heartbeat"`
	ConnectionType        string        `json:"connection_type"`
	PowerInfo             PowerInfo     `json:"power_info"`
	Bands                 []string      `json:"bands"`
	ProvidesWifi          bool          `json:"provides_wifi"`
	State                 string        `json:"state"`
}

EeroNode represents a single eero device (gateway or extender) in the mesh.

type EeroResponse

type EeroResponse[T any] struct {
	Meta APIError `json:"meta"`
	Data T        `json:"data"`
}

EeroResponse is a generic envelope for type-safe JSON unmarshaling of eero API responses. Use this when you want the compiler to enforce the data type at the call site — e.g., EeroResponse[[]Device] for list endpoints.

type EeroTime added in v1.1.0

type EeroTime struct {
	time.Time
}

EeroTime handles eero's custom timestamp formats that do not strictly comply with RFC3339, such as "2006-01-02T15:04:05+0000". It will try to parse using this custom format first, and fallback to time.RFC3339 format if it fails.

func (*EeroTime) UnmarshalJSON added in v1.1.0

func (t *EeroTime) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type EthernetStatus added in v1.1.0

type EthernetStatus struct {
	Value any `json:"value"` // Abstract generic field due to API variances.
}

EthernetStatus describes a wired link.

type GeoIP added in v1.1.0

type GeoIP struct {
	CountryCode string `json:"countryCode"`
	CountryName string `json:"countryName"`
	City        string `json:"city"`
	Region      string `json:"region"`
	Timezone    string `json:"timezone"`
	PostalCode  string `json:"postalCode"`
	MetroCode   int    `json:"metroCode"`
	AreaCode    *int   `json:"areaCode"`
	RegionName  string `json:"regionName"`
	ISP         string `json:"isp"`
	Org         string `json:"org"`
	ASN         int    `json:"asn"`
}

GeoIP holds geographical settings associated with the network's public IP.

type GuestNetwork added in v1.0.0

type GuestNetwork struct {
	URL     string `json:"url"`
	Name    string `json:"name"`
	Enabled bool   `json:"enabled"`
}

GuestNetwork holds the guest network settings.

type Health

type Health struct {
	Internet    InternetHealth `json:"internet"`
	EeroNetwork HealthDetail   `json:"eero_network"`
}

Health holds the overall network health indicators.

type HealthDetail

type HealthDetail struct {
	Status string `json:"status"`
}

HealthDetail is a single health metric.

type Homekit added in v1.1.0

type Homekit struct {
	Registered     bool   `json:"registered"`
	ProtectionMode string `json:"protection_mode"`
}

Homekit dictates whether the router isolates or enables tracking routing.

type IPSettings added in v1.1.0

type IPSettings struct {
	DoubleNAT bool   `json:"double_nat"`
	PublicIP  string `json:"public_ip"`
}

IPSettings is the networking configuration of IP allocations.

type IPv6Address added in v1.1.0

type IPv6Address struct {
	Address   string `json:"address"`
	Scope     string `json:"scope"`
	Interface string `json:"interface"`
}

IPv6Address holds the IPv6 configuration details for a single node interface.

type IPv6Lease added in v1.1.0

type IPv6Lease struct {
	Prefix      string   `json:"prefix"`
	Subnets     []string `json:"subnets"`
	NameServers []string `json:"name_servers"`
}

IPv6Lease gives a broader upstream prefix context given from an ISP.

type InternetHealth added in v1.1.0

type InternetHealth struct {
	Status string `json:"status"`
	ISPUp  bool   `json:"isp_up"`
}

InternetHealth is a health metric specifically for the internet connection.

type LeaseDHCP added in v1.1.0

type LeaseDHCP struct {
	IP     string `json:"ip"`
	Mask   string `json:"mask"`
	Router string `json:"router"`
}

LeaseDHCP describes the dynamic IPs given.

type LoginRequest

type LoginRequest struct {
	Login string `json:"login"`
}

LoginRequest is the body sent to POST /login.

type LoginResponse

type LoginResponse struct {
	UserToken string `json:"user_token"`
}

LoginResponse is the response from POST /login.

type MarketingEmailsConsent added in v1.1.0

type MarketingEmailsConsent struct {
	Consented bool `json:"consented"`
}

MarketingEmailsConsent holds the consent flag for marketing emails.

type NetworkConnection added in v1.1.0

type NetworkConnection struct {
	Mode string `json:"mode"`
}

NetworkConnection describes the router connection mode.

type NetworkDHCP added in v1.1.0

type NetworkDHCP struct {
	Mode string `json:"mode"`
}

NetworkDHCP holds LAN DHCP settings mode.

type NetworkDNS added in v1.1.0

type NetworkDNS struct {
	Mode    string    `json:"mode"`
	Parent  DNSParent `json:"parent"`
	Caching bool      `json:"caching"`
}

NetworkDNS holds networking DNS setup options.

type NetworkDetails

type NetworkDetails struct {
	URL            string                `json:"url"`
	Name           string                `json:"name"`
	DisplayName    string                `json:"display_name"`
	Status         string                `json:"status"`
	Gateway        string                `json:"gateway"`
	WanIP          string                `json:"wan_ip"`
	GatewayIP      string                `json:"gateway_ip"`
	Connection     NetworkConnection     `json:"connection"`
	GeoIP          GeoIP                 `json:"geo_ip"`
	Lease          NetworkLease          `json:"lease"`
	DHCP           NetworkDHCP           `json:"dhcp"`
	DNS            NetworkDNS            `json:"dns"`
	UpnpEnabled    bool                  `json:"upnp"`
	IPv6Upstream   bool                  `json:"ipv6_upstream"`
	ThreadEnabled  bool                  `json:"thread"`
	SQMEnabled     bool                  `json:"sqm"`
	BandSteering   bool                  `json:"band_steering"`
	Wpa3           bool                  `json:"wpa3"`
	WirelessMode   string                `json:"wireless_mode"`
	MloMode        string                `json:"mlo_mode"`
	Eeros          NetworkEeros          `json:"eeros"`
	Speed          NetworkSpeed          `json:"speed"`
	Timezone       NetworkTimezone       `json:"timezone"`
	Updates        NetworkUpdates        `json:"updates"`
	Health         Health                `json:"health"`
	IPSettings     IPSettings            `json:"ip_settings"`
	PremiumDNS     PremiumDNS            `json:"premium_dns"`
	Owner          string                `json:"owner"`
	PremiumStatus  string                `json:"premium_status"`
	LastReboot     *time.Time            `json:"last_reboot"`
	IPv6Lease      IPv6Lease             `json:"ipv6_lease"`
	IPv6           NetworkIPv6           `json:"ipv6"`
	GuestNetwork   GuestNetwork          `json:"guest_network"`
	PremiumDetails NetworkPremiumDetails `json:"premium_details"`
	WanType        string                `json:"wan_type"`
}

NetworkDetails represents the full details of an eero network, including its name, operational status, and last measured speed.

type NetworkEeros added in v1.0.0

type NetworkEeros struct {
	Count int        `json:"count"`
	Data  []EeroNode `json:"data"`
}

NetworkEeros holds the eeros count and the list of eero nodes.

type NetworkIPv6 added in v1.0.0

type NetworkIPv6 struct {
	NameServers struct {
		Mode string `json:"mode"`
	} `json:"name_servers"`
}

NetworkIPv6 holds the IPv6 configuration details for the network.

type NetworkLease added in v1.1.0

type NetworkLease struct {
	Mode string     `json:"mode"`
	DHCP *LeaseDHCP `json:"dhcp"`
}

NetworkLease represents network lease details including DHCP options.

type NetworkPremiumDetails added in v1.1.0

type NetworkPremiumDetails struct {
	HasPaymentInfo   bool   `json:"has_payment_info"`
	Tier             string `json:"tier"`
	PaymentMethod    string `json:"payment_method"`
	Interval         string `json:"interval"`
	IsMySubscription bool   `json:"is_my_subscription"`
}

NetworkPremiumDetails carries subscription context on an associated network.

type NetworkService

type NetworkService struct {
	// contains filtered or unexported fields
}

NetworkService provides access to eero network configuration and lifecycle.

func (*NetworkService) Get

func (s *NetworkService) Get(ctx context.Context, networkURL string) (*NetworkDetails, error)

Get retrieves full details for the specified network.

The networkURL parameter should be the exact relative URL from the account response (e.g., "/2.2/networks/12345"). Do not manually construct the path.

func (*NetworkService) Reboot

func (s *NetworkService) Reboot(ctx context.Context, networkURL string) error

Reboot triggers a reboot of all eero devices in the specified network.

The networkURL parameter should be the exact relative URL from the account response (e.g., "/2.2/networks/12345").

type NetworkSpeed

type NetworkSpeed struct {
	Status string           `json:"status"`
	Date   time.Time        `json:"date"`
	Up     SpeedMeasurement `json:"up"`
	Down   SpeedMeasurement `json:"down"`
}

NetworkSpeed holds the most recent speed test results for the network.

type NetworkSummary

type NetworkSummary struct {
	URL              string     `json:"url"`
	Name             string     `json:"name"`
	Created          time.Time  `json:"created"`
	NicknameLabel    *string    `json:"nickname_label"`
	AccessExpiresOn  *time.Time `json:"access_expires_on"`
	AmazonDirectedID string     `json:"amazon_directed_id"`
}

NetworkSummary is a lightweight reference to a network, returned within the account payload. The URL field contains the full relative API path (e.g., "/2.2/networks/12345") that should be passed directly to NetworkService.Get or DeviceService.List.

type NetworkTimezone added in v1.0.0

type NetworkTimezone struct {
	Value string `json:"value"`
	GeoIP string `json:"geo_ip"`
}

NetworkTimezone holds the timezone data for the network.

type NetworkUpdates added in v1.1.0

type NetworkUpdates struct {
	PreferredUpdateHour int       `json:"preferred_update_hour"`
	MinRequiredFirmware string    `json:"min_required_firmware"`
	TargetFirmware      string    `json:"target_firmware"`
	UpdateToFirmware    string    `json:"update_to_firmware"`
	UpdateRequired      bool      `json:"update_required"`
	CanUpdateNow        bool      `json:"can_update_now"`
	HasUpdate           bool      `json:"has_update"`
	LastUpdateStarted   time.Time `json:"last_update_started"`
	ManifestResource    string    `json:"manifest_resource"`
}

NetworkUpdates holds properties tracking when the firmware updates occur.

type PowerInfo added in v1.1.0

type PowerInfo struct {
	PowerSource string `json:"power_source"`
}

PowerInfo details connection details regarding power usage.

type PremiumDNS added in v1.1.0

type PremiumDNS struct {
	DNSPoliciesEnabled           bool            `json:"dns_policies_enabled"`
	ZscalerLocationEnabled       bool            `json:"zscaler_location_enabled"`
	AnyPoliciesEnabledForNetwork bool            `json:"any_policies_enabled_for_network"`
	DNSPolicies                  DNSPolicies     `json:"dns_policies"`
	AdBlockSettings              AdBlockSettings `json:"ad_block_settings"`
}

PremiumDNS tells us if eero Secure filtering is currently in use.

type PremiumDetails added in v1.1.0

type PremiumDetails struct {
	TrialEnds            *time.Time `json:"trial_ends"`
	HasPaymentInfo       bool       `json:"has_payment_info"`
	Tier                 string     `json:"tier"`
	SubscribedSince      *time.Time `json:"subscribed_since"`
	IsIapCustomer        bool       `json:"is_iap_customer"`
	PaymentMethod        string     `json:"payment_method"`
	Interval             string     `json:"interval"`
	NextBillingEventDate *time.Time `json:"next_billing_event_date"`
}

PremiumDetails holds eero Plus/Secure subscription information.

type Profile

type Profile struct {
	URL              string    `json:"url"`
	Name             string    `json:"name"`
	Paused           bool      `json:"paused"`
	DeviceCount      int       `json:"device_count"`
	Devices          []Device  `json:"devices"`
	BlockApps        bool      `json:"block_apps"`
	SafeSearchActive bool      `json:"safe_search_enabled"`
	Bedtime          *Schedule `json:"bedtime"`
}

Profile represents a user profile on the eero network.

type ProfileService

type ProfileService struct {
	// contains filtered or unexported fields
}

ProfileService manages user profiles (e.g., family members) on an eero network, including pausing and unpausing internet access.

func (*ProfileService) List added in v1.0.0

func (s *ProfileService) List(ctx context.Context, networkURL string) ([]Profile, error)

List returns all profiles on the specified network.

The networkURL parameter should be the exact relative URL from the account response (e.g., "/2.2/networks/12345").

func (*ProfileService) Pause added in v1.0.0

func (s *ProfileService) Pause(ctx context.Context, profileURL string) error

Pause pauses internet access for the given profile.

The profileURL parameter should be the exact relative URL from the profile response (e.g., "/2.2/networks/12345/profiles/67890").

func (*ProfileService) Unpause added in v1.0.0

func (s *ProfileService) Unpause(ctx context.Context, profileURL string) error

Unpause resumes internet access for the given profile.

The profileURL parameter should be the exact relative URL from the profile response (e.g., "/2.2/networks/12345/profiles/67890").

type PushSettings added in v1.1.0

type PushSettings struct {
	NetworkOffline bool `json:"networkOffline"`
	NodeOffline    bool `json:"nodeOffline"`
}

PushSettings holds push notification preferences.

type RateInfo added in v1.1.0

type RateInfo struct {
	RateBps       *int64  `json:"rate_bps"`
	MCS           *int    `json:"mcs"`
	NSS           *int    `json:"nss"`
	GuardInterval *string `json:"guard_interval"`
	ChannelWidth  *string `json:"channel_width"`
	PhyType       *string `json:"phy_type"`
}

RateInfo tracks Wi-Fi specifications and modulation info for clients.

type ReportIssue added in v1.1.0

type ReportIssue struct {
	Enabled bool `json:"enabled"`
}

ReportIssue represents the feature flag/availability.

type RingLTE added in v1.1.0

type RingLTE struct {
	IsNotPausable bool `json:"is_not_pausable"`
	RingManaged   bool `json:"ring_managed"`
	LTEEnabled    bool `json:"lte_enabled"`
}

RingLTE shows alarm pro integration.

type Schedule

type Schedule struct {
	Enabled bool   `json:"enabled"`
	Time    string `json:"time"`
}

Schedule represents a scheduled action (e.g., bedtime) on a profile.

type SpeedMeasurement

type SpeedMeasurement struct {
	Value float64 `json:"value"`
	Units string  `json:"units"`
}

SpeedMeasurement is a single directional speed measurement.

type Usage

type Usage struct {
	Download float64 `json:"download"`
	Upload   float64 `json:"upload"`
	Units    string  `json:"units"`
}

Usage holds bandwidth usage statistics for a device.

type VerifyRequest

type VerifyRequest struct {
	Code string `json:"code"`
}

VerifyRequest is the body sent to POST /login/verify.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL