PHPackages                             skeeks/yii2-google-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. skeeks/yii2-google-api

ActiveYii2-extension[API Development](/categories/api)

skeeks/yii2-google-api
======================

Component for work with google api based on google/apiclient

2.0.3(5y ago)1243.1k↓44.1%11BSD-3-ClausePHP

Since Mar 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/skeeks-semenov/yii2-google-api)[ Packagist](https://packagist.org/packages/skeeks/yii2-google-api)[ Docs](https://skeeks.com)[ RSS](/packages/skeeks-yii2-google-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (7)Used By (1)

Component for work with official google api
===========================================

[](#component-for-work-with-official-google-api)

Partly wrapper over powerful official package from google — google/apiclient

- [google/apiclient](https://github.com/google/google-api-php-client)
- [google/apiclient-services](https://github.com/google/google-api-php-client-services)
-

[![Latest Stable Version](https://camo.githubusercontent.com/1eb050ff3175f818ccca69fa6a80ab0a6515d75c2a7431c27b79d1cd8c2351e0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736b65656b732f796969322d676f6f676c652d6170692e737667)](https://packagist.org/packages/skeeks/yii2-google-api)[![Total Downloads](https://camo.githubusercontent.com/54177318288d3859c246b3ef7898a6679de4d0c4a30ee1bada21807e4dee57b9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736b65656b732f796969322d676f6f676c652d6170692e737667)](https://packagist.org/packages/skeeks/yii2-google-api)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist skeeks/yii2-google-api "^2.0.1"

```

or add

```
"skeeks/yii2-google-api": "^2.0.1"

```

How to use
----------

[](#how-to-use)

### Configuration app

[](#configuration-app)

```
//App config
[
    'components'    =>
    [
    //....
        'googleApi' =>
        [
            'class'       => '\skeeks\yii2\googleApi\GoogleApi',
            'key'         => 'YOUR_GOOLE_API_KEY',
        ],
    //....
    ]
]
```

An example of the Api transliteration
-------------------------------------

[](#an-example-of-the-api-transliteration)

[https://cloud.google.com/translate/v2/using\_rest](https://cloud.google.com/translate/v2/using_rest)

Translate "apple"

```
$result = \Yii::$app->googleApi->serviceTranslate->translate('apple', 'ru');
print_r($result);
```

or

```
$result = \Yii::$app->googleApi->serviceTranslate->googleService->translations->listTranslations('apple', 'ru');
print_r($result);
```

or

```
$googleService = \Yii::$app->googleApi->serviceTranslate->googleService;
$result = $googleService->translations->listTranslations('apple', 'ru');
print_r($result);
```

or

```
$googleClient = \Yii::$app->googleApi->googleClient;
$googleService = new \Google_Service_Translate($googleClient);
$result = $googleService->translations->listTranslations('apple', 'ru');
print_r($result);
```

```
$service = \Yii::$app->googleApi->serviceTranslate->googleService;
$result = $service->languages->listLanguages([
    'target' => 'ru'
]);
print_r($result);
```

An example other google services
--------------------------------

[](#an-example-other-google-services)

```
$googleClient = \Yii::$app->googleApi->googleClient;
$googleServiceAdsense = new \Google_Service_Adsense($googleClient);
$googleServiceAdsense = new \Google_Service_Youtube($googleClient);
//....
```

Your Google Services
--------------------

[](#your-google-services)

```
//App config
[
    'components'    =>
    [
    //....
        'googleApi' =>
        [
            'class'       => '\skeeks\yii2\googleApi\GoogleApi',
            'key'         => 'YOUR_GOOLE_API_KEY',

            'serviceTranslateClass' => 'skeeks\cms\googleApi\serviceTranslate\GoogleApiServiceTranslate'

            //or

            'serviceTranslateClass' => [
                'class' => 'skeeks\cms\googleApi\serviceTranslate\GoogleApiServiceTranslate',

                'option' => 'value'
            ],
        ],
    //....
    ]
]
```

---

> [![skeeks!](https://camo.githubusercontent.com/e80b006782c0ce0ce23f8e2e2530130e856f2f49c6a5a8e0e15eaf0c87d25d7b/68747470733a2f2f736b65656b732e636f6d2f696d672f6c6f676f2f6c6f676f2d6e6f2d7469746c652d383070782e706e67)](https://skeeks.com)
> *SkeekS CMS (Yii2) — quickly, easily and effectively!*
> [skeeks.com](https://skeeks.com) | [cms.skeeks.com](https://cms.skeeks.com)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~307 days

Recently: every ~107 days

Total

6

Last Release

2165d ago

Major Versions

1.1.0 → 2.0.02019-04-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/785306737dd13e3ea6826dfc04ab29ececa88f560d054ff595d64853cb878219?d=identicon)[skeeks-semenov](/maintainers/skeeks-semenov)

---

Top Contributors

[![skeeks-semenov](https://avatars.githubusercontent.com/u/9209305?v=4)](https://github.com/skeeks-semenov "skeeks-semenov (31 commits)")

---

Tags

apiapi-clientapiclientgooglegoogleapiskeeksskeeks-cmsyiiyii2yii2-extensionapiclientgoogleyii2skeeksyiicomponent

### Embed Badge

![Health badge](/badges/skeeks-yii2-google-api/health.svg)

```
[![Health](https://phpackages.com/badges/skeeks-yii2-google-api/health.svg)](https://phpackages.com/packages/skeeks-yii2-google-api)
```

###  Alternatives

[gemini-api-php/laravel

Gemini API client for Laravel

8915.7k](/packages/gemini-api-php-laravel)[sonko-dmitry/yii2-telegram-bot-api

Telegram bot api component for Yii2

2132.2k](/packages/sonko-dmitry-yii2-telegram-bot-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
