Created
March 18, 2019 14:22
-
-
Save castaneai/637ae6fb7fb1380c37e992d274a0ea19 to your computer and use it in GitHub Desktop.
tbf06 checked count
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
function fetch() { | |
var headers = {"Cookie": "user=xxxxxxxxxxxxxxxxxx;"}; // <- insert your cookie here | |
var params = { | |
"method": "GET", | |
"headers": headers, | |
}; | |
var url = "https://techbookfest.org/api/circle/own"; | |
var resp = UrlFetchApp.fetch(url, params); | |
return JSON.parse(resp.getContentText()); | |
} | |
function check() { | |
var resp = fetch(); | |
var checkedCount = resp[0].checkedCount; | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
sheet.insertRows(2, 1); | |
sheet.getRange(2, 1, 1, 2).setValues([[new Date(), checkedCount]]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment