beyerz / google-api-bundle
Symfony bundle to wrap the google api
Installs: 1 352
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.5
- google/apiclient: 2.1.3
- symfony/symfony: 2.8.*
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-18 21:05:52 UTC
README
GoogleApiBundle
Easy Integration for Symfony2 projects requiring Google PHP SDK
Installation
Composer
composer require beyerz/google-api-bundle
Application Kernel
Add BeyerzGoogleApiBundle to the registerBundles()
method of your application kernel:
public function registerBundles() { return array( new Beyerz\GoogleApiBundle\BeyerzGoogleApiBundle(), ); }
Config
Enable loading of the OGP service and setting default values by adding the following to
the application's config.yml
file:
A Base and facebook library are currently supported, but you can add as many libraries with as many default values that you like
#BeyerzGoogleApiBundle beyerz_google_api: application_name: 'Sample Application Name' credentials_manager: 'Beyerz\GoogleApiBundle\Manager\CredentialsManager' client_secret_path: '/Resources/client_secret.json' scopes: - 'https://www.googleapis.com/auth/gmail.readonly' - 'https://www.googleapis.com/auth/gmail.send' - 'https://www.googleapis.com/auth/plus.login' - 'https://www.googleapis.com/auth/contacts' - 'https://www.googleapis.com/auth/contacts.readonly' - 'https://www.googleapis.com/auth/plus.login' - 'https://www.googleapis.com/auth/plus.me' - 'https://www.googleapis.com/auth/userinfo.email' - 'https://www.googleapis.com/auth/userinfo.profile' services: gmail: access_type: "offline" plus: access_type: "offline" people: access_type: "offline" oauth2: access_type: "offline"