This repo offers a collection of Go based SDKs and tools for interacting with various Apple API services and device management services, including:
- iTunes Search API
- Apple Business Manager / Apple School Manager API
- Apple Device Management API (MDM)
- Clean, idiomatic Go API
- Fluent builder patterns for constructing API requests
- Comprehensive error handling
- Configurable logging with zap
- Automatic retries with configurable parameters
- Extensive test coverage
- Complete examples for all supported operations
The SDK provides a complete implementation of the iTunes Search API, allowing you to:
- Search for content across iTunes, App Store, iBooks Store, and Mac App Store
- Look up content by ID, UPC, EAN, ISRC, or ISBN
- Filter results by media type, entity, country, and more
Complete implementation of the Apple Business Manager API with modern Go practices:
Devices API:
- Get organization devices with filtering and pagination
- Get detailed device information by serial number
- Support for all device types (iPhone, iPad, Mac, Apple TV, Apple Watch)
Device Management Services API:
- List device management services in an organization
- Get device serial numbers assigned to services
- Assign/unassign devices to/from management services
- Get device management service assignments and information
- Track device activity operations
Key Features:
- Centralized Architecture: Unified error handling, pagination, and query building
- Resty v3 Integration: Built on latest Resty v3 with best practices
- JWT Authentication: Built-in Apple JWT token generation and management
- Structured Logging: Comprehensive request/response logging with zap
- Type Safety: Full generics support with structured response models
- Pagination: Automatic pagination with iterators and collectors
- Context Support: Context-aware operations for timeouts and cancellation
Quick Start:
Get started quickly with multiple client setup options:
// Method 1: Simple setup with environment variables
axmClient, err := axm.NewClientFromEnv()
if err != nil {
log.Fatalf("Failed to create client: %v", err)
}
// Create service clients
devicesClient := devices.NewClient(axmClient)
deviceManagementClient := devicemanagement.NewClient(axmClient)
// Get organization devices
ctx := context.Background()
response, err := devicesClient.GetOrganizationDevices(ctx, &devices.GetOrganizationDevicesOptions{
Fields: []string{
devices.FieldSerialNumber,
devices.FieldDeviceModel,
devices.FieldStatus,
},
Limit: 100,
})
if err != nil {
log.Fatalf("Error getting devices: %v", err)
}
fmt.Printf("Found %d devices\n", len(response.Data))
📖 Complete Quick Start Guide →
The guide covers 6 different client setup methods, from simple environment variables to advanced builder patterns with full customization options.
Integration with Apple Device Management for:
- Mobile Device Management (MDM) operations
- Configuration profile management
- App and book distribution
- Declarative device management
Explore the examples directory for comprehensive examples of using the SDK with different Apple services.
For detailed documentation, see:
- Go Reference Documentation
- iTunes Search API Documentation
- Apple Business Manager API Documentation
- Apple Device Management Documentation
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License.