2017 © Pedro Peláez
 

library pheetsu

PHP library to CRUDify Google Spreadsheets like sheetsu.com

image

ttskch/pheetsu

PHP library to CRUDify Google Spreadsheets like sheetsu.com

  • Monday, May 14, 2018
  • by ttskch
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

pheetsu

Latest Stable Version Total Downloads, (*1)

PHP library to CRUDify Google Spreadsheets like sheetsu.com., (*2)

Requirements

  • PHP 5.6+

Installations

$ composer require ttskch/pheetsu:@dev

Usage

If you have a Google Spreadsheet like this,, (*3)

image, (*4)

You can CRUD the spreadsheet via pheetsu so easily like below., (*5)

Initializing with OAuth2

$pheetsu = \Ttskch\Pheetsu\Factory\PheetsuFactory::createOAuth(
    'google_oauth2_client_id',
    'google_oauth2_client_secret',
    'google_oauth2_redirect_uri',
    'google_oauth2_javascript_origin',
    '1JQkfd3dlyxFRuxIwGPnBnrxS-l-bLVw_BbHskxT9Nj4', // spreadsheet id
    'demo' // sheet name
);

// authenticate and be authorized with Google OAuth2.
$pheetsu->authenticate();

Initializing with Service Account

$pheetsu = \Ttskch\Pheetsu\Factory\PheetsuFactory::createServiceAccount(
    '/path/to/your/service-account-credentials.json',
    '1JQkfd3dlyxFRuxIwGPnBnrxS-l-bLVw_BbHskxT9Nj4', // spreadsheet id
    'demo' // sheet name
);

Using

$rows = $pheetsu->read();
var_dump($rows);

// array (size=3)
//   0 => 
//     array (size=3)
//       'id' => string '1' (length=1)
//       'name' => string 'Alice' (length=5)
//       'age' => string '20' (length=2)
//   1 => 
//     array (size=3)
//       'id' => string '2' (length=1)
//       'name' => string 'Bob' (length=3)
//       'age' => string '25' (length=2)
//   2 => 
//     array (size=3)
//       'id' => string '3' (length=1)
//       'name' => string 'Charlie' (length=7)
//       'age' => string '18' (length=2)

See also demo., (*6)

The Versions

14/05 2018

dev-master

9999999-dev https://github.com/ttskch/pheetsu

PHP library to CRUDify Google Spreadsheets like sheetsu.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Takashi Kanemoto

api crud spreadsheets sheetsu