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

  1. Installation
  2. Usage
  3. Resources

Latest Stable Version Total Downloads

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

skeeks!
SkeekS CMS (Yii2) — quickly, easily and effectively!
skeeks.com | cms.skeeks.com

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

Related Extensions