Skip to content

sonni1337/google-api-php-client-with-lifelog

 
 

Repository files navigation

Google APIs Client Library for PHP with Lifelog

Description

The Google API Client Library with Lifelog enables you to work with Sony Lifelog and also Google APIs such as Google+, Drive, or YouTube on your server.

Development version

This library is in development version. This can be seen as a proof of concept, but will hopefully be more mature in the future. It is based on Google Client v.1.1.5 (beta), https://github.com/google/google-api-php-client.

Requirements

Note: some features (service accounts and id token verification) require PHP 5.3.0 and above due to cryptographic algorithm requirements.

Developer Documentation

TBD

Installation

TBD

Basic Example

See the examples/ directory for examples of the key client features.

<?php

  require_once 'google-api-php-client-with-lifelog/src/Google/autoload.php'; // or wherever autoload.php is located
  
  $client = new Google_Client();
  $client->setClientId($client_id);
  $client->setClientSecret($client_secret);
  $client->setRedirectUri($redirect_uri);
  $client->addScope(Google_Service_Lifelog::LIFELOG_PROFILE_READ);
  $client->addScope(Google_Service_Lifelog::LIFELOG_ACTIVITY_READ);
  $client->addScope(Google_Service_Lifelog::LIFELOG_LOCATION_READ);
  
  $service = new Google_Service_Lifelog($client);
  $dataSources = $service->users_dataSources;
  $listDataSources = $dataSources->listUsersDataSources("me");
  printf("My e-mail: %s<br/>", $listDataSources[0]['username']);
  

About

A PHP client library for accessing Sony Lifelog through Google APIs Client library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%