Created
April 17, 2016 19:31
-
-
Save kbk0125/8ebb1c4ab9053a8bcb6103c6489d1b6d to your computer and use it in GitHub Desktop.
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
//Blockspring APIs take in data as if it was from a spreadsheet. Needs nested arrays | |
//Like this: [[row1val1, row1val2],[row2val1, row2val2]...] | |
//Example from Blockspring site | |
var orig = "[[\"name\",\"random number\"],[\"Jason\",\"150\"],[\"Don\",\"250\"],[\"Paul\",\"50\"]]" | |
//Add values to sheet | |
blockspring.runParsed("append-to-google-spreadsheet", { | |
//middle parameter from Google Spreadhseet URL | |
//https://docs.google.com/spreadsheets/d/FILE_ID/edit?usp=sharing | |
"file_id": 'YOURIDHERE', | |
// The first sheet within the particular doc will always be 0 | |
"worksheet_id": 0, | |
//The array of arrays, as stated above | |
"values": allData}, | |
//Provided on the page at https://open.blockspring.com/pkpp1233/append-to-google-spreadsheet | |
{ "api_key": "YOURAPIKEYHERE" }, | |
function(res){ | |
//console.log to check for errors | |
console.log(res); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment