Skip to content

Instantly share code, notes, and snippets.

@brucemcpherson
Created August 17, 2012 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brucemcpherson/3378231 to your computer and use it in GitHub Desktop.
Save brucemcpherson/3378231 to your computer and use it in GitHub Desktop.
Neil deGrasse Tyson quotes API: The Daily REST library entry for Excel and GAScript
You can download cDataSet.xlsm from
http://ramblings.mcpher.com/Home/excelquirks/json/rest
The Google Apps script version is here
https://docs.google.com/spreadsheet/ccc?key=0At2ExLh4POiZdFAzUElyTGNQLW90aEFKeHhJZDR1WWc
(requires in mcpher library - GAS key MEQ3tE5y5_cTOAgUbUKSIAiz3TLx7pV4j
- details at https://gist.github.com/3358690)
// google apps script version
function testNeilDegrasseTysonQuotes() {
var howMany = 10;
for (var i = 0 ; i < howMany; i++) {
mcpher.restQuery ("neildegrassetysonquotes", "neildegrassetysonquotes", undefined
,undefined , undefined,undefined ,undefined ,undefined , undefined,undefined
, true, undefined,undefined ,undefined , i);
}
}
' vba version
Public Sub testneildegrassetysonquotes()
Dim i As Long
Const howMany = 10
For i = 1 To howMany
restQuery "neildegrassetysonquotes", "neildegrassetysonquotes", _
, , , , , , , , True, , , , (i <> 1)
Next i
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment