yii2-google-api Partly wrapper over powerful official package from google — google/apiclient

  1. Installation
  2. Usage
  3. Resources

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require skeeks/yii2-google-api "*"

or add

"skeeks/yii2-google-api": "*"

Usage

//App config
[
    'components'    =>
    [
    //....
        'googleApi' =>
        [
            'class'                 => '\skeeks\yii2\googleApi\GoogleApiComponent',
            'developer_key'         => 'YOUR_GOOLE_API_KEY',
        ],
    //....
    ]
]
$service = new Google_Service_Translate(\Yii::$app->googleApi->client);
$result = $service->languages->listLanguages([
    'target' => 'ru'
]);
print_r($result);

$result = $service->translations->listTranslations('apple', 'ru');
print_r($result);

Resources

0 0
1 follower
0 downloads
Yii Version: 2.0
License: BSD-2-Clause
Category: Web Service
Developed by: skeeks
Created on: Mar 28, 2016
Last updated: 2 years ago

Related Extensions