2017 © Pedro Peláez
 

yii2-extension yii2-google-spreadsheet

Access to Google SpreadSheet from Yii2 by Google REST API.

image

sergmoro1/yii2-google-spreadsheet

Access to Google SpreadSheet from Yii2 by Google REST API.

  • Monday, July 11, 2016
  • by sergmoro1
  • Repository
  • 1 Watchers
  • 0 Stars
  • 39 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 26 % Grown

The README.md

Access to Google Sheets from Yii2

Simple extension for getting list of user's spreadsheets and open selected spreadsheet in IFRAME., (*1)

Example of using Google REST API and OAuth2 authorization., (*2)

Installation

Register Google-project first

Follow the instructions - Setting up OAuth 2.0 ., (*3)

Set up extension

$ composer require sergmoro1/yii2-google-spreadsheet "dev-master"

Usage

1.Copy model, controller and views from ./example to corresponding directories of your app. Change methords and actions or leave them as is., (*4)

2.Define constants in params file (for ex. in frontend/config/params.php)., (*5)

<?php
return [
    'clientId' => '***',
    'clientSecret' => '***',
    // dev (for ex.)
    'redirectUri' => 'http://localhost/yoursite/frontend/web/google/oauth',
    // production
    //'redirectUri' => 'http://yoursite/google/oauth',
];

3.Declare Redirect Uri in your Google Project. For ex., (*6)

// dev
http://localhost/yousite/frontend/web/google/oauth2, (*7)

// production
http://yoursiteDOTcom/google/oauth2, (*8)

Result

Now you can view list of your spreadsheets, if you have them, by active Uri at the moment:, (*9)

http://yoursite_or_localhost_path/google, (*10)

The Versions

11/07 2016

dev-master

9999999-dev

Access to Google SpreadSheet from Yii2 by Google REST API.

  Sources   Download

MIT

The Requires

 

by Sergey Morozov

rest api yii2 google spreadsheet