happyr/google-api-bundle

A Symfony2 Wrapper for the Google APIs Client Library for PHP

Installs: 5 050

Dependents: 1

Stars: 13

Watchers: 3

Forks: 13

Open Issues: 1

Language: PHP

2.1.0 2015-01-07 09:23 UTC

README

A symfony2 bundle to communicate to Google API. This bundle is a Symfony2 wrapper for the google apiclient. There are some services not yet implemented. Please submit a PR and I'm happy to merge.

Installation

Step 1: Using Composer

Install it with Composer!

// composer.json
{
    // ...
    require: {
        // ...
        "happyr/google-api-bundle": "~2.1",
    }
}

Then, you can install the new dependencies by running Composer's update command from the directory where your composer.json file is located:

$ php composer.phar update

Step 2: Register the bundle

To register the bundles with your kernel:

<?php

// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new HappyR\Google\ApiBundle\HappyRGoogleApiBundle(),
    // ...
);

Step 3: Configure the bundle

# app/config/config.yml
# you will get these parameters form https://code.google.com/apis/console/"
happy_r_google_api:
  application_name: MySite
  oauth2_client_id: 
  oauth2_client_secret: 
  oauth2_redirect_uri: 
  developer_key: 
  site_name: mysite.com