Skip to content

Draft: Add dbus API for adding contact with preset properties

Julian Sparber requested to merge (removed):upstream-dbus into main

This is on top of !94 (merged) so only the last commit is important. This MR is based on !66 (closed) but since my editor refactor the underlying code changed, therefore I opened a new MR.

The API takes an array of (key, value) pairs.

Supported keys: This can be specified multiple times "email-addresses", "notes", "phone-numbers" Only the last will be stored (because this properies are unique) "alias", "full-name", "nickname"

Not all properites are supported for now because they can't be easily set via dbus because they arn't a string

The API can be used via gdbus as well gdbus call --session --dest org.gnome.Contacts --object-path /org/gnome/Contacts --method org.gtk.Actions.Activate 'new-contact-data' '[<[("email-addresses", "julian@sparber.net"), ("phone-numbers", "+39333333"), ("email-addresses", "secondo@example.com")]>]' '{}'

Edited by Niels De Graef

Merge request reports