Created
August 17, 2012 11:44
-
-
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
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
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) |
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
// 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); | |
} | |
} |
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
' 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