Created
April 17, 2012 19:13
-
-
Save kconragan/2408364 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
// Takes NDBC Buoy ID, and returns | |
// series of readings | |
var fetchBuoy = function(buoyId) { | |
var path = 'http://www.ndbc.noaa.gov/data/5day2/' + buoyId + '_5day.txt'; | |
request(path, function(err, response, body) { | |
if(err) { | |
throw err; | |
} | |
return body; | |
}); | |
}; | |
exports.parseBuoyData = function(buoy) { | |
var buoys = fetchBuoy(buoy).then(function(data) { | |
console.log(data); | |
}) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment