Useless API to report a Apple devices battery level and for fetching the last reported value.
Requirements
- Bun
Quick start
- Fill out .env
API_KEY=changme
- Install packages + run the server with Bun:
bun ibun run startApple Shortcuts
- Open the Shortcuts app on iPhone iPad or Macbook.
- Create a new shortcut and add these:
- Get Battery Level
- Get contents of URL
http://localhost:3000/api/update/macbook - Method: POST
- Headers:
Key: AuthorizationValue: Bearer API_KEY - Request Body: JSON, Key
level, Typenumber, ValueBattery Level
- Run the shortcut
Endpoints