Last active
April 12, 2016 03:55
-
-
Save auycro/ab7a5bcf7548fc4746217a96906648ec to your computer and use it in GitHub Desktop.
chatwork google app script
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 myFunction() { | |
var key = "{token-key}"; | |
var url = "https://api.chatwork.com/v1/my/status"; | |
//var url = "https://api.chatwork.com/v1/rooms/{room-id}/messages"; | |
sendToService_(url,key); | |
} | |
function sendToService_(url,key) { | |
var headers = { | |
'X-ChatWorkToken': key | |
}; | |
var payload = { | |
"body" : "Hello,World", | |
"fieldOne" : "value for field one" | |
} | |
var options = { | |
"method" : "get", | |
"contentType" : "application/json", | |
"headers" : headers, | |
//"payload" : payload | |
}; | |
Logger.log( UrlFetchApp.fetch(url, options)); | |
//return UrlFetchApp.fetch(url, options); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment