PHP Classes

PHP Google Contacts API: Access Google contacts with the Google People API

Recommend this page to a friend!

  Author Author  
Picture of Stefan Kientzler
Name: Stefan Kientzler <contact>
Classes: 18 packages by
Country: Germany Germany
Innovation award
Innovation award
Nominee: 11x

Winner: 6x


  Detailed description   Download Download .zip .tar.gz  
This package can access Google contacts with the Google People API.

It can send HTTP requests to the Google People API Web server to perform several operations with the contact information of users with Google accounts.

Currently, it can:

- Obtain authorization to access the contacts of user with a Google account using the OAuth 2 protocol

- List the user contacts

- Search for contacts

- Filter contacts by contact group label

- Create, edit, and delete contacts

- List contact groups

- Create, edit, and delete contact groups

- Assign and remove contacts to contact groups

- Set and remove contact photo images

Details

Access to google contacts through the google people API

Latest Stable Version License Donate Minimum PHP Version Scrutinizer Code Quality

Overview

This package provides all classes and functions to manage the contacts of a Google account. Access is via the Google Perons API with OAuth2 authentication. The following functionalities are supported: - Login and authentication to the google account - List contacts - Search in contacts - Filter contacts per conatct group (-> Label) - create / edit / delete contacts - list contact groups - create / edit / delete contact groups - assign /remove contacts to contact groups - set / remove contact photos

The package only uses the standard PHP cURL library and have no further dependencies to any other 3rd party libraries or packages.

The fact that on almost every mobile phone that runs under Android, the contacts are managed either with the Google Contacts or with a compatible app and are also automatically be synchronised with the Google account contacts (with the appropriate setting), makes this package interesting for management- and/or synchronization purposes.

Usage

A smart example of using the package is provided. This example is only intended to demonstrate the use of the package. The UI is only coded 'quick and dirty', contains no validations and should therefore only be used as a starting point for your own implementation.

Take a lock at the files - ContactList.php - ContactDetails.php - DoAction.php - GoogleLogin.php - GoogleOauth2Callback.php

The starting point is the file ´ContactList.php´

A complete documentation of the classes and a detailed description, how to create your own credential to access the google API can be found at https://github.com/Stefanius67/GContacts/wiki

Logging

This package can use any PSR-3 compliant logger. The logger is initialized with a NullLogger-object by default. The logger of your choice have to be passed to the constructor of the ´GClient´ class.

If you are not working with a PSR-3 compatible logger so far, this is a good opportunity to deal with this recommendation and may work with it in the future.

There are several more or less extensive PSR-3 packages available on the Internet.

You can also take a look at the 'XLogger' package and the associated blog 'PSR-3 logging in a PHP application' as an introduction to this topic.


  Classes of Stefan Kientzler  >  PHP Google Contacts API  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog (1)  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP Google Contacts API
Base name: gcontacts
Description: Access Google contacts with the Google People API
Version: 1.0.0
PHP version: 7.4
License: GNU General Public License (GPL)
 
  Groups   Applications   Files Files  

  Groups  
Group folder image User Management User records, authentication and session handling View top rated classes
Group folder image Web services Web data clipping, SOAP or XML-RPC clients and servers View top rated classes
Group folder image PHP 7 Classes using PHP 7 specific features View top rated classes


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Files folder imagesecrets (1 file)
Files folder imageSKien (1 directory)
Files folder imageVendor (1 directory)
Accessible without login Plain text file autoloader.php Aux. Auxiliary script
Accessible without login Plain text file ContactDetails.php Example Example script
Accessible without login Plain text file ContactList.php Example Example script
Accessible without login Plain text file displayApiError.php Aux. Auxiliary script
Accessible without login Plain text file DoAction.php Example Example script
Accessible without login Plain text file githubwiki.xml Data Auxiliary data
Accessible without login Plain text file GoogleLogin.php Example Example script
Accessible without login Plain text file GoogleOauth2Callback.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpstan.neon Data Auxiliary data
Accessible without login Plain text file readme.md Doc. Documentation

  Files folder image Files  /  secrets  
File Role Description
  Accessible without login Plain text file .htaccess Data Auxiliary data

  Files folder image Files  /  SKien  
File Role Description
Files folder imageGoogle (7 files)

  Files folder image Files  /  SKien  /  Google  
File Role Description
  Plain text file GClient.php Class Class source
  Plain text file GContact.php Class Class source
  Plain text file GContactGroups.php Class Class source
  Plain text file GContacts.php Class Class source
  Plain text file GSecrets.php Class Class source
  Plain text file MissingClientInformationException.php Class Class source
  Plain text file MissingPropertyException.php Class Class source

  Files folder image Files  /  Vendor  
File Role Description
Files folder imagePsr (1 directory)

  Files folder image Files  /  Vendor  /  Psr  
File Role Description
Files folder imageLog (8 files)

  Files folder image Files  /  Vendor  /  Psr  /  Log  
File Role Description
  Plain text file AbstractLogger.php Class Class source
  Plain text file InvalidArgumentException.php Class Class source
  Plain text file LoggerAwareInterface.php Class Class source
  Plain text file LoggerAwareTrait.php Class Class source
  Plain text file LoggerInterface.php Class Class source
  Plain text file LoggerTrait.php Class Class source
  Plain text file LogLevel.php Class Class source
  Plain text file NullLogger.php Class Class source

Download Download all files: gcontacts.tar.gz gcontacts.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
  Files folder image Files  
File Role Description
Files folder imagesecrets (1 file)
Files folder imageSKien (1 directory)
Files folder imageVendor (1 directory)
Accessible without login Plain text file autoloader.php Aux. Auxiliary script
Accessible without login Plain text file ContactDetails.php Example Example script
Accessible without login Plain text file ContactList.php Example Example script
Accessible without login Plain text file displayApiError.php Aux. Auxiliary script
Accessible without login Plain text file DoAction.php Example Example script
Accessible without login Plain text file githubwiki.xml Data Auxiliary data
Accessible without login Plain text file GoogleLogin.php Example Example script
Accessible without login Plain text file GoogleOauth2Callback.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpstan.neon Data Auxiliary data
Accessible without login Plain text file readme.md Doc. Documentation

  Files folder image Files  /  secrets  
File Role Description
  Accessible without login Plain text file .htaccess Data Auxiliary data

  Files folder image Files  /  SKien  
File Role Description
Files folder imageGoogle (7 files)

  Files folder image Files  /  SKien  /  Google  
File Role Description
  Plain text file GClient.php Class Class source
  Plain text file GContact.php Class Class source
  Plain text file GContactGroups.php Class Class source
  Plain text file GContacts.php Class Class source
  Plain text file GSecrets.php Class Class source
  Plain text file MissingClientInformationException.php Class Class source
  Plain text file MissingPropertyException.php Class Class source

  Files folder image Files  /  Vendor  
File Role Description
Files folder imagePsr (1 directory)

  Files folder image Files  /  Vendor  /  Psr  
File Role Description
Files folder imageLog (8 files)

  Files folder image Files  /  Vendor  /  Psr  /  Log  
File Role Description
  Plain text file AbstractLogger.php Class Class source
  Plain text file InvalidArgumentException.php Class Class source
  Plain text file LoggerAwareInterface.php Class Class source
  Plain text file LoggerAwareTrait.php Class Class source
  Plain text file LoggerInterface.php Class Class source
  Plain text file LoggerTrait.php Class Class source
  Plain text file LogLevel.php Class Class source
  Plain text file NullLogger.php Class Class source

Download Download all files: gcontacts.tar.gz gcontacts.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.