mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 00:26:29 +00:00
Implements the remaining zone slave management endpoints from the official Bose SoundTouch Web API v1.0 specification, bringing API coverage to 89%. ## New Features ### Client Methods - AddZoneSlave(masterID, slaveID, slaveIP) - Add individual device to zone - AddZoneSlaveByDeviceID(masterID, slaveID) - Add device by ID only - RemoveZoneSlave(masterID, slaveID, slaveIP) - Remove individual device - RemoveZoneSlaveByDeviceID(masterID, slaveID) - Remove device by ID only ### Models - ZoneSlaveRequest - Request structure for slave operations - ZoneSlaveEntry - Individual slave entry with IP address support - Complete XML marshaling/unmarshaling with proper omitempty handling - Comprehensive validation and error handling ### CLI Commands - zone add-slave --master ID --slave ID [--slave-ip IP] - zone remove-slave --master ID --slave ID [--slave-ip IP] ## Implementation Details - Follows official API specification exactly (POST /addZoneSlave, /removeZoneSlave) - Supports both device ID + IP and device ID only operations - Comprehensive input validation (IP addresses, device ID conflicts) - Proper XML formatting with omitempty for optional IP addresses - Extensive test coverage (580+ lines of tests) - Integration with existing high-level zone management API ## Testing - 200+ new test cases covering all functionality - Complete model validation and XML marshaling tests - HTTP client integration tests with mock servers - Error handling and edge case coverage - Network error simulation tests ## Documentation Updates - Updated API coverage from 84% to 89% (17/19 endpoints) - Comprehensive API coverage analysis document - Updated README.md with new endpoint status - Added practical usage examples - CLI help documentation ## Compatibility - Maintains full backward compatibility - Complements existing high-level zone API - Users can choose between low-level official API or enhanced high-level API - No breaking changes to existing functionality This implementation provides both the exact official API endpoints and enhanced high-level zone management, giving users maximum flexibility for zone operations while maintaining full API compliance.