endroid/google-api-bundle

This package is abandoned and no longer maintained. The author suggests using the google/apiclient package instead.

Endroid Google API for Symfony

Installs: 2 127

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 1

Open Issues: 0

Type:symfony-bundle

2.0.1 2018-01-03 21:21 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:46:28 UTC


README

By endroid

Latest Stable Version Build Status Total Downloads Monthly Downloads License

This bundle provides easy integration with google/google-api-php-client which allows you to access different Google API's. For more information visit the developer documentation.

knpbundles.com

Installation

Use Composer to install the bundle.

$ composer require endroid/google-api-bundle

Then enable the bundle via the kernel.

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = [
        // ...
        new Endroid\GoogleApiBundle\EndroidGoogleApiBundle(),
    ];
}

Configuration

config.yml

endroid_google_api:
    application_name: <application name>
    api_key: <api key>
        

Usage

After installation and configuration, the Google API client can be used to access the desired API.

$client = $this->get('endroid.google_api_client');
$service = new Google_Service_Translate($client);

$translations = $service->translations->listTranslations('Hello', 'fr');

Versioning

Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility breaking changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading.

License

This bundle is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code.