Show and update your preferences
Why
The gap card [CLI] Read and update my preferences names two operations the SDK has had since v0.29.1 that the CLI didn't reach (found by the coverage report in basecamp/basecamp-sdk#1055). The CLI is pinned to SDK v0.34.0, which has both, so this builds on main with no bump.
What changed
| Operation | Command |
|---|---|
GetMyPreferences (GET /my/preferences.json) | basecamp people preferences [me] |
UpdateMyPreferences (PUT /my/preferences.json) | basecamp people preferences [me] --week-start <day> --time-format 12h|24h --time-zone <zone> |
It follows people out-of-office: the target can only be me, no flags shows your preferences, and flags update them. Each preference is sent only when you pass its flag. Bad input is caught before any request goes out: --week-start takes Sunday through Saturday in any case, --time-format takes 12h/24h or the API's own twelve_hour/twenty_four_hour, and none of the three accepts an empty value. These preferences can't be cleared, and the SDK would quietly drop an empty value anyway. The SDK's update returns nothing, so the command reads the preferences back. If that read fails, the update is still reported as done, with a diagnostic, the same way people update handles it.
people update's help used to say week start and time format "are not edited here". It now points to people preferences me.
Also updated: the catalog entry (commands.go), the API-COVERAGE.md people row and the .surface snapshot. skills/basecamp/SKILL.md is unchanged: it works by discovery and doesn't list the profile or out-of-office commands either.
Builds on
main at df22084f. Nothing else is needed.
Left out
Nothing. The API-COVERAGE.md endpoint counts are unchanged: the people row's count of 15 is already higher than the endpoints the row lists, and reconciling those counts is tracked separately, as the file's note says.
Tests
internal/commands/people_preferences_test.go: show (bare and withme), an update that sends only the given fields insidepersonand returns the read-back, all three fields together, the time-format names, bad input refused before any request (unknown or empty day, unknown or empty format, blank zone), a target other thanmerefused, and a failed read-back reported as success with a diagnostic.e2e/people.bats: offline usage errors for an unknown day, an unknown format and another target.e2e/smoke/smoke_account.bats:people preferences meagainst a live account.bin/cipasses locally.
Gap card
Summary by cubic
Adds basecamp people preferences [me] to show and update your own preferences — week start, time format, and time zone — using SDK operations GetMyPreferences and UpdateMyPreferences that the CLI previously didn't reach.
- Bare invocation reads your preferences;
--week-start,--time-format, and--time-zoneflags send only the values you pass. - Input is validated before any request, and only
meis accepted as the target. - The update reads preferences back to show the result; a failed read-back still reports the update as done, with a diagnostic.