PHP code example of vadgab / yii2-google-calendar-api

1. Go to this page and download the library: Download vadgab/yii2-google-calendar-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vadgab / yii2-google-calendar-api example snippets


use vadgab\Yii2GoogleCalendar\GoogleCalendar;

$serviceAccount = new GoogleCalendar(
            "your_service_email", 
            "./../your_downloaded_key.json", array(
            "https://www.googleapis.com/auth/calendar",
            "https://www.googleapis.com/auth/calendar.events"
        )
    );        

$serviceAccount->calendarId = "calendarId";  //

use vadgab\Yii2GoogleCalendar\GoogleCalendar;

$serviceAccount = new GoogleCalendar(
            "your_service_email", 
            "./../your_downloaded_key.json", array(
            "https://www.googleapis.com/auth/calendar",
            "https://www.googleapis.com/auth/calendar.events"
        )
    );        

$serviceAccount->calendarId = "calendarId";  //

use vadgab\Yii2GoogleCalendar\GoogleCalendar;

$serviceAccount = new GoogleCalendar(
            "your_service_email", 
            "./../your_downloaded_key.json", array(
            "https://www.googleapis.com/auth/calendar",
            "https://www.googleapis.com/auth/calendar.events"
        )
    );        

$serviceAccount->calendarId = "calendarId";  //o "<pre>";
var_dump($events);
echo "</pre>";


use vadgab\Yii2GoogleCalendar\GoogleCalendar;

$serviceAccount = new GoogleCalendar(
            "your_service_email", 
            "./../your_downloaded_key.json", array(
            "https://www.googleapis.com/auth/calendar",
            "https://www.googleapis.com/auth/calendar.events"
        )
    );        

$serviceAccount->calendarId = "calendarId";  //