Skip to content
  • Julian Sparber's avatar
    Add dbus API for adding contact with preset properties · 19078a35
    Julian Sparber authored and Julian Sparber's avatar Julian Sparber committed
    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")]>]' '{}'
    19078a35