Skip to content

marcusorjames/CakePHP-Google-API-Plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CakePHP Google API Plugin

Requirements

CakePHP v2.x
Opauth

How to use it

  1. Install this plugin for your CakePHP app.
    Assuming APP is the directory where your CakePHP app resides, it's usually app/ from the base of CakePHP.

    cd APP/Plugin
    git clone git://github.com/LubosRemplik/CakePHP-Google-API-Plugin.git Google
  2. Install required plugins with all dependcies and configuration Opauth

  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

About

Cakephp's Google API Plugin which allows you easily CRUD google data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published