Conversation
|
This PR will trigger a minor release when merged. |
# Conflicts: # package-lock.json
| this.log = log; | ||
| } | ||
|
|
||
| async getOrganicSearchData(baseURL, startDate, endDate) { |
There was a problem hiding this comment.
we could add startRow and rowLimit as params with default values 0 and 10. That way, this API could also provide a way to paginate
| ); | ||
|
|
||
| authClient.setCredentials({ | ||
| access_token: context.env.ACCESS_TOKEN, |
There was a problem hiding this comment.
are access token and refresh token expected to come from env variables? 🤔 these should be short lived creds, unless we don't have a way to automatically rotate them, I guess we need to obtain these tokens freshly from google, not from env variables
There was a problem hiding this comment.
the idea was to write a customer secret wrapper, that adds the secrets as env variables for the duration of the function execution.
Do you think this should be handled differently?
There was a problem hiding this comment.
the idea was to write a customer secret wrapper, that adds the secrets as env variables for the duration of the function execution.
where the "customer secret wrapper" is expected to read those secrets from? request body or the query params? If that's the case, then we can get it from context.data or context.params
# Conflicts: # package-lock.json # packages/spacecat-shared-http-utils/test/index.test.js
|
some improvements discussed f2f (checkauth method and input validation, version pinning) |
# Conflicts: # package-lock.json
|
🎉 This PR is included in version @adobe/spacecat-shared-google-client-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [@adobe/spacecat-shared-http-utils-v1.3.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-http-utils-v1.2.1...@adobe/spacecat-shared-http-utils-v1.3.0) (2024-05-21) ### Features * introduce google client ([#219](#219)) ([71eeb64](71eeb64))
|
🎉 This PR is included in version @adobe/spacecat-shared-http-utils-v1.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR introduces the GoogleClient, designed to facilitate interactions with Google APIs for retrieving organic search data and listing sites. The class uses AWS Secrets Manager to securely manage Google OAuth credentials, ensuring secure and efficient API requests.