Spaces:
Sleeping
Sleeping
DmitrMakeev
commited on
Commit
•
c4c9fac
1
Parent(s):
676b366
Update google_sheets.py
Browse files- google_sheets.py +3 -2
google_sheets.py
CHANGED
@@ -27,10 +27,12 @@ def send_data_to_google_sheets():
|
|
27 |
]
|
28 |
|
29 |
# URL для отправки данных
|
30 |
-
url = f'https://sheets.googleapis.com/v4/spreadsheets/{spreadsheet_id}/values/{sheet_name}:append?
|
31 |
|
32 |
# Формирование тела запроса
|
33 |
data = {
|
|
|
|
|
34 |
"values": new_values
|
35 |
}
|
36 |
|
@@ -51,4 +53,3 @@ def start_scheduler():
|
|
51 |
scheduler.add_job(func=send_data_to_google_sheets, trigger="interval", hours=1)
|
52 |
scheduler.start()
|
53 |
return scheduler
|
54 |
-
|
|
|
27 |
]
|
28 |
|
29 |
# URL для отправки данных
|
30 |
+
url = f'https://sheets.googleapis.com/v4/spreadsheets/{spreadsheet_id}/values/{sheet_name}:append?key={api_key_goo}'
|
31 |
|
32 |
# Формирование тела запроса
|
33 |
data = {
|
34 |
+
"range": sheet_name,
|
35 |
+
"majorDimension": "ROWS",
|
36 |
"values": new_values
|
37 |
}
|
38 |
|
|
|
53 |
scheduler.add_job(func=send_data_to_google_sheets, trigger="interval", hours=1)
|
54 |
scheduler.start()
|
55 |
return scheduler
|
|