zaphyra's git: airpodsctl

Control and monitor your AirPods

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 
package types

type BatteryState struct {
	Charging bool `json:"charging"`
	Level    int  `json:"level"`
}

type EarDetectionState struct {
	LeftInEar  bool `json:"left_in_ear"`
	RightInEar bool `json:"right_in_ear"`
}

type Device struct {
	Address string `json:"address"`
	Battery struct {
		Case      Option[BatteryState] `json:"case"`
		Headphone Option[BatteryState] `json:"headphone"`
		LeftBud   Option[BatteryState] `json:"left"`
		RightBud  Option[BatteryState] `json:"right"`
	} `json:"battery"`
	BatteryTTLEstimate BatteryTTLEstimate        `json:"battery_ttl_estimate"`
	Connected          Bool                      `json:"connected"`
	EarDetection       Option[EarDetectionState] `json:"ear_detection"`
	Features           struct {
		Num35              Option[Bool] `json:"35"`
		ThreeE             Option[Bool] `json:"3e"`
		AdaptiveVolume     Option[Bool] `json:"adaptive_volume"`
		Conversational     Option[Bool] `json:"conversational"`
		HearingAidSettings Option[Bool] `json:"hearing_aid_settings"`
		OneBudAnc          Option[Bool] `json:"one_bud_anc"`
		Ssl                Option[Bool] `json:"ssl"`
		VolumeSwipe        Option[Bool] `json:"volume_swipe"`
	} `json:"features"`
	Name    string          `json:"name"`
	ANCMode Option[ANCMode] `json:"noise_mode"`
}