Recent

Author Topic: Google people API: how to create a contact?  (Read 151 times)

mgc

  • New Member
  • *
  • Posts: 10
Google people API: how to create a contact?
« on: May 06, 2022, 04:02:05 am »
I can read all contacts from Google using People API:

Code: Pascal  [Select][+][-]
  1. uses
  2. googlepeople, googleservice, googleclient
  3. var
  4.   Resp: TListConnectionsResponse;  
  5.   Per: TPerson;
  6. begin
  7.   Resp := FPeopleAPI.PeopleConnectionsResource.List('people/me',  
  8.   'personFields=names,emailAddresses');
  9.    for Per in Resp.connections do
  10.      if Length(Per.Names)>0 then
  11.        Memo1.Lines.Add(Per.Names[0].displayName+': '+Per.emailAddresses[0].Value)
  12. end;
  13.  

However, there is no method to create a contact in Lazarus client library, although there is a method called "people.createContact" in the API reference (https://developers.google.com/people/api/rest/v1/people/createContact).

Please, how could I create a contact using Google People API?
« Last Edit: May 06, 2022, 04:06:42 am by mgc »

 

TinyPortal © 2005-2018