Update google/apiclient recipe (#1369)

This commit is contained in:
Sébastien ALFAIATE
2022-12-15 14:18:53 +07:00
committed by GitHub
parent e74a00346e
commit 2caae3d04e
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
services:
Google\Client:
class: Google\Client
calls:
# Authentication with "API key"
- [setDeveloperKey, ['%env(GOOGLE_API_KEY)%']]
# Authentication with "OAuth 2.0" using Client ID & Secret
- [setClientId, ['%env(GOOGLE_CLIENT_ID)%']]
- [setClientSecret, ['%env(GOOGLE_CLIENT_SECRET)%']]
# Authentication with "OAuth 2.0" or "Service account" using JSON
- [setAuthConfig, ['%env(resolve:GOOGLE_AUTH_CONFIG)%']]

View File

@@ -0,0 +1,11 @@
{
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
},
"env": {
"GOOGLE_API_KEY": "",
"GOOGLE_CLIENT_ID": "",
"GOOGLE_CLIENT_SECRET": "",
"GOOGLE_AUTH_CONFIG": "%kernel.project_dir%/path/to/file.json"
}
}