junker/google-api-service-provider

Google API Service Provider for Silex

0.2.0 2020-06-18 16:04 UTC

This package is auto-updated.

Last update: 2024-12-19 02:19:04 UTC


README

Google API Service Provider for Silex

Installation

The best way to install HandlerSocketServiceProvider is to use a Composer:

composer require junker/google-api-service-provider

Usage

	$app->register(new Junker\Silex\Provider\GoogleApiServiceProvider(), [
		'google.api.client.id' => '22166332432432113784.apps.googleusercontent.com', #optional
		'google.api.client.secret' => 'qa4R-T3-K7p4hWGtZ1SVpMlr.apps.googleusercontent.com', #optional
		'google.api.client.scopes' => ['https://www.googleapis.com/auth/userinfo.profile'], #optional

		'google.api.service.key_file' => __DIR__.'/../google.json', #optional
		'google.api.service.scopes' => __DIR__.'/../google.json', #optional

		'google.api.developer.key' => 'AIzgSyrQTNQ-kNhhwVYjTLakWEW_T89zbCvzYS8', #optional
	]);

	$oauth_client = $app['google.api.client'];
	$service_client = $app['google.api.service'];
	$developer_client = $app['google.api.developer'];

Documentation