gnomegoogle-contacts-apigjsgobject-introspectionvapi

How can I access gnome-contacts or its data from gjs


According to this answer (and comments) gnome-contacts is where contacts are centralized for Gnome and it does a good job of aggregating via telepathy, but the only way to access that information seems to be the Gnome Shell search provider which only provides an avatar and a name. I've been struggling to duplicate portions of gnome-contacts in gjs but having tons of trouble with the bindings.

Is there an easier way to achieve this, or is it possible for me to generate vapi/gir binding for gnome-contacts itself so I can use it like a library?

Possible Alternate Solution:

Using libfolks in GJS is currently blocked by Bug #694115, but for those only needing Google Contacts it is possible in GJS via GData and you can even use Gnome Online Accounts as an authentication source, if available.


Solution

  • Use libfolks, which is what gnome-contacts uses internally to source its data. libfolks should be usable via gjs, although this has not been extensively tested, so there might be binding issues.

    Please report any binding issues here.