Hi all
I was reading a post on this forum about the use of google spreadsheet, JSON and API key:
https://bitcointalk.org/index.php?PHPSESSID=r99941oq967hvd3uk0nfrj51h6&topic=167635.2260Well, I'd like to ask directly to the author but I cannot for my newbie status ... so here I am.
I have to admit I know NOTHING about JAVA scripts so please excuse my incompetence
This Are steps I tried to follow
I've opened a new spreadsheet in google docs then I selected tools >> manage script >> new
I copied and past the code the author suggested (down here), I set my api key and tried to click run function ... the page blame about "ss" is not defined .
Any suggestion or link to howto/guide to help this old donk (aka me) will be appreciated.
TNX in advance for your help
ReferenceError: "ss" non definito. (riga 9, file "Codice")
CODE
var range = ss.getSheets()[0].getRange("A1:A1");
var url = 'https://multipool.us/api.php?api_key=<12345_MYAPI_KEY_6789>';
var content = UrlFetchApp.fetch(url).getContentText();
var mydata = Utilities.jsonParse(content);
/* LTC */
var datacut = mydata['currency']['ltc']['confirmed_rewards'];
SpreadsheetApp.setActiveRange(range);
SpreadsheetApp.getActiveRange().setValue(datacut);
var range = ss.getSheets()[0].getRange("A2:A2");
var mydata = Utilities.jsonParse(content);
var datacut = mydata['currency']['ltc']['estimated_rewards'];
SpreadsheetApp.setActiveRange(range);
SpreadsheetApp.getActiveRange().setValue(datacut);
var range = ss.getSheets()[0].getRange("A3:A3");
var mydata = Utilities.jsonParse(content);
var datacut = mydata['currency']['ltc']['hashrate'];
SpreadsheetApp.setActiveRange(range);
SpreadsheetApp.getActiveRange().setValue(datacut);