-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Description Please explain the changes you made here. ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] All tests passing - [ ] Extended the documentation, if necessary
- Loading branch information
1 parent
39aa9b3
commit c0ac46e
Showing
11 changed files
with
393 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Google API usage in Hyperion | ||
|
||
Hyperion can use Google API to run App Script and upload files to Google Drive. | ||
|
||
## Configuration | ||
|
||
You need to configure a client id and secret in the dotenv: | ||
|
||
```yml | ||
GOOGLE_API_CLIENT_ID | ||
GOOGLE_API_CLIENT_SECRET | ||
``` | ||
|
||
1. Go to https://console.cloud.google.com/projectcreate and create a new project | ||
2. Select the project and open [API and Services](https://console.cloud.google.com/apis/dashboard) | ||
3. Select "Library" and add the following libraries: | ||
a. Google Drive API | ||
b. Google Sheets API | ||
c. Apps Script API | ||
4. Go to [Credentials](https://console.cloud.google.com/apis/credentials). Select "Configure Consent Screen" | ||
a. User Type : Internal | ||
5. Go to [Credentials](https://console.cloud.google.com/apis/credentials). Select "Create credentials" then: | ||
a. OAuth client id | ||
b. Web Application | ||
c. TODO: redirect uri? |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from datetime import datetime | ||
|
||
from app.types.core_data import BaseCoreData | ||
|
||
|
||
class GoogleAPICredentials(BaseCoreData): | ||
token: str | ||
refresh_token: str | ||
token_uri: str | ||
client_id: str | ||
client_secret: str | ||
scopes: list[str] | ||
expiry: datetime | ||
|
||
|
||
class GoogleAPIOAuthFlow(BaseCoreData): | ||
state: str | None = None |
Oops, something went wrong.