feat(contacts): add address support to create/update commands#148
Merged
steipete merged 1 commit intoopenclaw:mainfrom Mar 8, 2026
Merged
feat(contacts): add address support to create/update commands#148steipete merged 1 commit intoopenclaw:mainfrom
steipete merged 1 commit intoopenclaw:mainfrom
Conversation
2c82857 to
3ab0b0c
Compare
Author
Updated PRI've expanded this PR to include support for more Google People API fields: New Flags (create & update)
All fields display in Examplegog contacts create --given John --family Doe \
--birthday "1990-05-15" \
--company "Acme Corp" --title "Engineer" \
--nickname "Johnny"
gog contacts update people/c123 --notes "Met at conference" |
3ab0b0c to
830cff7
Compare
cb30c94 to
d04b188
Compare
- Add --address flag to 'contacts create' and 'contacts update' (repeatable, like --url; empty value clears all addresses on update) - Display addresses in 'contacts get' text output - Add 'addresses' to contactsUpdateReadMask so existing addresses are fetched before patching - Add contactsAddresses() helper and formatAddress()/allAddresses() display helpers - Also fix pre-existing compile error: contactsApplyPersonName and contactsApplyPersonOrganization had incorrect Go parameter-grouping syntax (given,familySet bool / org,titleSet bool) which made the string params typed as bool — corrected to explicit string types
d04b188 to
4f2f72f
Compare
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
--addressflag togog contacts createandgog contacts updatecommands, allowing users to set street addresses on contacts.Changes
addressestocontactsReadMaskfor API requestsAddressfield toContactsCreateCmdandContactsUpdateCmdprimaryAddress()helper to extract formatted addressgog contacts getoutputUsage
Testing
make testpassesmake fmtappliedNotes
The
--addressflag sets theStreetAddressfield. Google automatically generates theFormattedValuefrom this. For display, we preferFormattedValueif available, falling back toStreetAddress.This follows the existing pattern for phone/email handling in the codebase.