{"id":26234887,"url":"https://github.com/flowpack/flowpack.googleapiclient","last_synced_at":"2025-10-03T21:43:28.924Z","repository":{"id":34366209,"uuid":"177946265","full_name":"Flowpack/Flowpack.GoogleApiClient","owner":"Flowpack","description":"Simplifies integrating the Google PHP Api Client into Flow / Neos CMS apps","archived":false,"fork":false,"pushed_at":"2022-04-22T16:05:40.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-13T05:04:00.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Flowpack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-27T08:01:09.000Z","updated_at":"2022-04-22T16:05:20.000Z","dependencies_parsed_at":"2022-08-08T01:00:06.094Z","dependency_job_id":null,"html_url":"https://github.com/Flowpack/Flowpack.GoogleApiClient","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowpack%2FFlowpack.GoogleApiClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowpack%2FFlowpack.GoogleApiClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowpack%2FFlowpack.GoogleApiClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowpack%2FFlowpack.GoogleApiClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flowpack","download_url":"https://codeload.github.com/Flowpack/Flowpack.GoogleApiClient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250263669,"owners_count":21401927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-03-13T02:29:49.601Z","updated_at":"2025-10-03T21:43:28.817Z","avatar_url":"https://github.com/Flowpack.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flowpack-googleapiclient\n\nA package that provides Neos Flow \u0026 CMS packages with authentication and helpers for the Google API Client.\n\n## Installation\n\nAdd the dependency to your site package like this:\n\n    composer require --no-update flowpack/googleapiclient\n    \nAnd then run `composer update` in your project's root folder.\n\n## Configuration\n\n### Authentication\n\nFirst retrieve your `auth.json` file from [Google](https://cloud.google.com/docs/authentication/production).\n\nTo allow the API client to authenticate, you either have to store the credentials via the following command:\n\n    ./flow googleapi:storecredentials auth.json\n\nOr set the environment variable `GOOGLE_APPLICATION_CREDENTIALS` to the path where you store your `auth.json`.\n\n### Application name\n\nSet your application name in your `Settings.yaml` like this:\n\n    Flowpack:\n      GoogleApiClient:\n        applicationName: 'My app' \n\n## Usage\n\nAdd an `Objects.yaml` to your package's `Configuration` folder with the following content and adapt to your service name:\n\n    Vendor\\Package\\Service\\MyGoogleService:\n      arguments:\n        1:\n          object:\n            factoryObjectName: Flowpack\\GoogleApiClient\\Service\\ClientFactory\n            factoryMethodName: create\n            \nThen have your `MyGoogleService` class look like this:\n\n    \u003c?php\n    namespace Vendor\\Package\\Service;\n    \n    use Google_Client;\n    use Neos\\Flow\\Annotations as Flow;\n    \n    /**\n     * My Google API service\n     *\n     * @Flow\\Scope(\"singleton\")\n     */\n    class MyGoogleService extends \\Google_Service_Webmasters\n    {\n        /**\n         * @inheritdoc\n         */\n        public function __construct(Google_Client $client)\n        {\n            parent::__construct($client);\n    \n            $client-\u003eaddScope(\\Google_Service_Webmasters::WEBMASTERS);\n        }\n    }\n\nIn this example it would use the API for the Google Webmasters endpoints.\n\nYou can adjust this to the API you need by changing the inheritance and setting the correct scope in the constructor.\n\nFinally implement the methods for accessing the API and inject the service wherever you need it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowpack%2Fflowpack.googleapiclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowpack%2Fflowpack.googleapiclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowpack%2Fflowpack.googleapiclient/lists"}