kappa/google

Integration Google API into Nette Framework for better work with service accounts

v0.1.0 2014-09-09 16:49 UTC

This package is auto-updated.

Last update: 2024-10-04 19:18:40 UTC


README

Integration Google API into Nette Framework for better work with service accounts

Requirements:

Installation:

The best way to install Kappa\Google is using Composer

$ composer require kappa/doctrine:@dev

Usages

Configuration:

google:
	appName: "Your app name"
	scopes:
		- https://www.googleapis.com/auth/calendar
	clientId: "" # Your client ID
	email: "" # Your client email
	key: "" # path to key.p12 file

In presenter:

class BasePresenter  extends Presenter
{
	/**
	 * @var \Kappa\Google\Accounts\ServiceAccount
	 * @inject
	 */
	public $serviceAccount

	public function actionDefault()
	{
		dump($this->serviceAccount->getClient()) // Returns logged client
		die();
	}

	// ...
}