AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Comunicación / Funciones Google / Google Contacts
  • Presentación
  • ¿Cómo gestionar los contactos de Google?
  • Managing the Google contacts
  • Creating a Google contact
  • Remark
  • ¿Cómo recuperar un contacto de Google?
  • ¿Cómo modificar o eliminar contactos de Google?
  • Principle
  • Modifying a contact
  • Deleting a contact
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Advertencia
Desde el 15 de junio de 2021, la API de contactos de Google utilizada por esta función ya no está disponible (https://developers.google.com/contacts/v3/announcement).
Para utilizar Google Contacts, consulta la API de personas publicada por Google como sustituto: https://developers.google.com/people. <restRequest variable>.Send le permite integrar fácilmente una API REST en sus proyectos de desarrollo.
Presentación
Google Contacts is used to manage contacts on the Internet. WINDEV and WEBDEV allow you to create an application for synchronizing the contacts of an existing program with the contacts of Google Contact.
Warning: Before using a feature related to Google services, we strongly advise you to refer to the license agreement for that service.. Some restrictions may apply. The content of the licenses may change over time.
PC SOFT is in no case responsible for the way the native access functions are used. Make sure that you comply with the license of the service provider.
¿Cómo gestionar los contactos de Google?

Managing the Google contacts

To manage the Google contacts:
  1. Create a Google account if necessary. This account can be created via the following address: http://code.google.com/intl/en/apis/maps/signup.html. Caution: the address of this page may have changed since this page was written.
    The Google account is identified by an email address and the associated password.
  2. In the code of your application, create a variable of type gglConnection. This variable contains the characteristics of the connection to your Google account.

Creating a Google contact

A Google contact can be created via the Google interface or through programming with the WLanguage functions.
To create a Google contact with the WLanguage functions:
  1. Create a variable of type gglContact.
  2. Define the characteristics of the contact with the gglContact properties.
  3. Validate the creation of the contact with <gglConnection variable>.Write.

Remark

If you use a proxy to access Internet, the proxy must be configured (Proxy) to use Google functions.
¿Cómo recuperar un contacto de Google?
To retrieve a Google contact:
  1. Declare an array of gglContact variables.
  2. Use the <gglConnection variable>ListContact function. This function is used to list the contacts. The contacts found are assigned to the array of gglContact variables.
Example:
Cnt is gglConnection
...
 
// Retrieves all the contacts
arrContacts is array of 0 gglContact
arrContacts = Cnt.ListContact()
// Browse the contacts
MyContact is gglContact
FOR EACH MyContact OF arrContacts
Trace(MyContact.Name)
END
¿Cómo modificar o eliminar contactos de Google?

Principle

The principle is straightforward: You must find and position on the contact to modify or delete before performing the requested operation.

Modifying a contact

To modify a contact:
  1. Retrieve the list of contacts.
  2. Find the contact to modify.
  3. Modify the characteristics of the contact.
  4. Validate the modifications with <gglConnection variable>.Write.
Example:
Cnt is gglConnection
...
 
// Retrieves all the contacts
arrContacts is array of 0 gglContact
arrContacts = Cnt.ListContact()
// Browse the contacts
MyContact is gglContact
FOR EACH MyContact OF arrContacts
IF MyContact.Name = "MOORE" THEN
MyContact.PostalAddress[1].Address = "34080 Montpellier"
// Actually update the changes on the server
Cnt.Write(MyContact)
END
END

Deleting a contact

To delete a contact:
  1. Retrieve the list of contacts.
  2. Find the contact to delete.
  3. Delete the contact with <gglConnection variable>.Delete.
Example:
Cnt is gglConnection
...
 
// Retrieves all the contacts
arrContacts is array of 0 gglContact
arrContacts = Cnt.ListContact()
// Browse the contacts
MyContact is gglContact
FOR EACH MyContact OF arrContacts
IF MyContact.Name = "MOORE" THEN
// Deletion
Cnt.Delete(MyContact)
END
END
Versión mínima requerida
  • Versión 24
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 21/09/2024

Señalar un error o enviar una sugerencia | Ayuda local