tirins/google

There is no license information available for the latest version (1.0.3) of this package.

CakePHP Google plugin

Installs: 13

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 9

Type:cakephp-plugin

1.0.3 2015-05-29 15:23 UTC

This package is not auto-updated.

Last update: 2024-04-27 15:31:33 UTC


README

Requirements

CakePHP v2.x
Opauth

Installlation

  1. Use composer. Add following to the composer.json file:

    "require": {
    	"lubos/google": "~1.0"
    }
    

    And run php composer.phar update

  2. Install required plugins with all dependcies and configuration (done via composer)

  3. Connect google's account with your application http://example.org/auth/google

  4. Include needed model in your controller or anywhere you want to

    $uses = array('Google.GoogleDriveFiles');
    ...
    $data = $this->GoogleDriveFiles->listItems();
    debug ($data);
    $data = ClassRegistry::init('Google.GoogleDriveFiles')->listItems();
    debug ($data);

Sample

  1. Install CakePHP Google API Plugin sample

    git clone --recursive https://github.com/LubosRemplik/CakePHP-Google-API-Plugin-sample.git google-sample-app
  2. Create database & run bake, schema scripts

    # basic cakephp installation
    cd google-sample-app/app
    chmod -R 777 tmp
    Console/cake bake db_config
    
    # schema
    Console/cake schema create -p Opauth
  3. Configure - set google's credentials
    Copy bootstrap.php.default to bootstrap.php and add your client_id, client_secret. You can get these details at https://code.google.com/apis/console/

    cp Config/bootstrap.php.default Config/bootstrap.php
    vim Config/bootstrap.php

Note You have to configure Opauth correctly