Skip to content

Instantly share code, notes, and snippets.

@dogeared
Created December 23, 2010 15:51
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 dogeared/753152 to your computer and use it in GitHub Desktop.
Save dogeared/753152 to your computer and use it in GitHub Desktop.
Node code for getting google reports
app.post('/api/v1/sem/generate_report', function(req, res) {
inspect("Java requested report for account: " + req.body.account_id);
ReportService.generate(req, res, function(credentials, params) {
ReportService.generateReportFor(credentials, params, res, function(engineId) {
ReportService.downloadReportFor[credentials.engine](params, res, credentials, engineId, function(reportFile) {
ReportService.uploadToS3(config.S3.reportBucket + config.S3.s3Suffix, params.s3_storage_path, res, reportFile, function(message) {
res.send(message);
});
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment