This file contains hidden or 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
{ | |
"type": "leveledUp", | |
"initialLvl": 51, | |
"finalLvl": 52, | |
"webhookType": "userActivity", | |
"user": { | |
"_id": "3cf895d2-7939-4446-bfb7-8ef8dfe1ec70" | |
} | |
} |
This file contains hidden or 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
const USER_ID = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; | |
const API_TOKEN = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; | |
const PARAMS = { | |
"headers": { | |
"x-api-user": USER_ID, | |
"x-api-key": API_TOKEN, | |
"x-client": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-ScriptName" | |
}, | |
"muteHttpExceptions": true |
This file contains hidden or 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
let scriptProperties = PropertiesService.getScriptProperties(); | |
/** | |
* doPost(e) | |
* | |
* This function is called by webhooks. Stores webhook data in | |
* a script property and creates a temporary trigger that will | |
* run in the next ~5 mins or so to process the webhook. This | |
* is necessary if a Google Apps Script might run longer than | |
* 30s, because there's no way to send a response in GAS besides |
This file contains hidden or 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
const LOG_SCRIPT_OUTPUT = true; | |
const LOG_SPREADSHEET_URL = "https://docs.google.com/spreadsheets/d/15tnycb0m9i2ypy_VWvB1XtHKz5jWOnLEotukHYECLL0"; | |
const LOG_SPREADSHEET_TAB_NAME = "Sheet1"; | |
const LOG_SPREADSHEET_MAX_ROWS = 2000; // if too many rows, spreadsheet cannot fit in RAM and will crash | |
/** | |
* log(output) | |
* | |
* Logs output to the console and, if LOG_SCRIPT_OUTPUT is true, to the | |
* spreadsheet. Replace all instances of console.log() with log() in your |
This file contains hidden or 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
{ | |
"type": "scored", | |
"direction": "up", | |
"delta": 0.5798096619915684, | |
"task": { | |
"repeat": { | |
"m": true, | |
"t": true, | |
"w": true, | |
"th": true, |
This file contains hidden or 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
{ | |
"type": "scored", | |
"direction": "up", | |
"delta": 0.6935255111371725, | |
"task": { | |
"repeat": { | |
"m": true, | |
"t": true, | |
"w": true, | |
"th": true, |
This file contains hidden or 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
{ | |
"type": "questInvited", | |
"group": { | |
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", | |
"name": "Habit Kickers Elite" | |
}, | |
"quest": { | |
"key": "taskwoodsTerror2", | |
"questOwner": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | |
}, |
This file contains hidden or 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
{ | |
"type": "questFinished", | |
"group": { | |
"id": "9c574405-6dc0-4c7f-82d9-740852ef6436", | |
"name": "Habit Kickers Elite" | |
}, | |
"quest": { | |
"key": "moonstone3" | |
}, | |
"webhookType": "questActivity", |
This file contains hidden or 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
{ | |
"group": { | |
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", | |
"name": "HK Sandbox" | |
}, | |
"chat": { | |
"flagCount": 0, | |
"flags": {}, | |
"_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", | |
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", |