{"id":22014098,"url":"https://github.com/skeeks-semenov/yii2-google-api","last_synced_at":"2026-03-10T14:31:07.753Z","repository":{"id":57052459,"uuid":"54891675","full_name":"skeeks-semenov/yii2-google-api","owner":"skeeks-semenov","description":"Component for work with official google api","archived":false,"fork":false,"pushed_at":"2020-06-13T10:38:17.000Z","size":29,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-03T13:48:12.096Z","etag":null,"topics":["api","api-client","apiclient","google","googleapi","skeeks","skeeks-cms","yii","yii2","yii2-extension"],"latest_commit_sha":null,"homepage":"https://skeeks.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skeeks-semenov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-28T12:46:58.000Z","updated_at":"2024-07-02T12:38:09.000Z","dependencies_parsed_at":"2022-08-24T05:10:16.207Z","dependency_job_id":null,"html_url":"https://github.com/skeeks-semenov/yii2-google-api","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/skeeks-semenov/yii2-google-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeeks-semenov%2Fyii2-google-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeeks-semenov%2Fyii2-google-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeeks-semenov%2Fyii2-google-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeeks-semenov%2Fyii2-google-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skeeks-semenov","download_url":"https://codeload.github.com/skeeks-semenov/yii2-google-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeeks-semenov%2Fyii2-google-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30337174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T12:41:07.687Z","status":"ssl_error","status_checked_at":"2026-03-10T12:41:06.728Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-client","apiclient","google","googleapi","skeeks","skeeks-cms","yii","yii2","yii2-extension"],"created_at":"2024-11-30T03:26:16.734Z","updated_at":"2026-03-10T14:31:07.733Z","avatar_url":"https://github.com/skeeks-semenov.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Component for work with official google api\n===================================\n\nPartly wrapper over powerful official package from google — google/apiclient\n\n* [google/apiclient](https://github.com/google/google-api-php-client)\n* [google/apiclient-services](https://github.com/google/google-api-php-client-services)\n* https://console.cloud.google.com/home/dashboard\n\n\n[![Latest Stable Version](https://img.shields.io/packagist/v/skeeks/yii2-google-api.svg)](https://packagist.org/packages/skeeks/yii2-google-api)\n[![Total Downloads](https://img.shields.io/packagist/dt/skeeks/yii2-google-api.svg)](https://packagist.org/packages/skeeks/yii2-google-api)\n\nInstallation\n------------\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\nphp composer.phar require --prefer-dist skeeks/yii2-google-api \"^2.0.1\"\n```\n\nor add\n\n```\n\"skeeks/yii2-google-api\": \"^2.0.1\"\n```\n\n\nHow to use\n----------\n\n### Configuration app\n```php\n//App config\n[\n    'components'    =\u003e\n    [\n    //....\n        'googleApi' =\u003e\n        [\n            'class'       =\u003e '\\skeeks\\yii2\\googleApi\\GoogleApi',\n            'key'         =\u003e 'YOUR_GOOLE_API_KEY',\n        ],\n    //....\n    ]\n]\n\n```\n\nAn example of the Api transliteration\n---\n\nhttps://cloud.google.com/translate/v2/using_rest\n\nTranslate \"apple\"\n\n```php\n$result = \\Yii::$app-\u003egoogleApi-\u003eserviceTranslate-\u003etranslate('apple', 'ru');\nprint_r($result);\n```\n\nor\n\n```php\n$result = \\Yii::$app-\u003egoogleApi-\u003eserviceTranslate-\u003egoogleService-\u003etranslations-\u003elistTranslations('apple', 'ru');\nprint_r($result);\n```\n\nor\n\n```php\n$googleService = \\Yii::$app-\u003egoogleApi-\u003eserviceTranslate-\u003egoogleService;\n$result = $googleService-\u003etranslations-\u003elistTranslations('apple', 'ru');\nprint_r($result);\n```\n\nor\n\n```php\n$googleClient = \\Yii::$app-\u003egoogleApi-\u003egoogleClient;\n$googleService = new \\Google_Service_Translate($googleClient);\n$result = $googleService-\u003etranslations-\u003elistTranslations('apple', 'ru');\nprint_r($result);\n```\n\n```php\n$service = \\Yii::$app-\u003egoogleApi-\u003eserviceTranslate-\u003egoogleService;\n$result = $service-\u003elanguages-\u003elistLanguages([\n    'target' =\u003e 'ru'\n]);\nprint_r($result);\n```\n\n\nAn example other google services\n---\n\n```php\n\n$googleClient = \\Yii::$app-\u003egoogleApi-\u003egoogleClient;\n$googleServiceAdsense = new \\Google_Service_Adsense($googleClient);\n$googleServiceAdsense = new \\Google_Service_Youtube($googleClient);\n//....\n\n```\n\nYour Google Services\n---\n\n```php\n//App config\n[\n    'components'    =\u003e\n    [\n    //....\n        'googleApi' =\u003e\n        [\n            'class'       =\u003e '\\skeeks\\yii2\\googleApi\\GoogleApi',\n            'key'         =\u003e 'YOUR_GOOLE_API_KEY',\n            \n            'serviceTranslateClass' =\u003e 'skeeks\\cms\\googleApi\\serviceTranslate\\GoogleApiServiceTranslate'\n            \n            //or\n            \n            'serviceTranslateClass' =\u003e [\n                'class' =\u003e 'skeeks\\cms\\googleApi\\serviceTranslate\\GoogleApiServiceTranslate',\n                \n                'option' =\u003e 'value'\n            ],\n        ],\n    //....\n    ]\n]\n\n```\n\n\n___\n\n\u003e [![skeeks!](https://skeeks.com/img/logo/logo-no-title-80px.png)](https://skeeks.com)  \n\u003ci\u003eSkeekS CMS (Yii2) — quickly, easily and effectively!\u003c/i\u003e  \n[skeeks.com](https://skeeks.com) | [cms.skeeks.com](https://cms.skeeks.com)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskeeks-semenov%2Fyii2-google-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskeeks-semenov%2Fyii2-google-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskeeks-semenov%2Fyii2-google-api/lists"}