Created
June 1, 2019 16:22
-
-
Save brianray/1e22237f168e5a1a565891612471a04d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function sentiment_analysis(content) { | |
var URL = "https://us-central1-mw-automl-first-look.cloudfunctions.net/analyze" | |
var options = { | |
'method' : 'post', | |
'contentType': 'application/json', | |
// Convert the JavaScript object to a JSON string. | |
'payload' : JSON.stringify({"content": content}) | |
}; | |
return UrlFetchApp.fetch(URL, options).getContentText(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment