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
/** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
* httpGetTemplate.gs | |
* | |
* A pair of template functions for external host communication with | |
* UrlFetchApp, including parameter encoding and error handling. | |
* | |
* From: gist.github.com/mogsdad/a76c32231a2b91ff8b59 | |
* | |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
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
function getPO() { | |
var oauth_nonce = createGuid(); | |
var oauth_timestamp = (new Date().valueOf()/1000).toFixed(0); | |
var CONSUMER_KEY = 'CONSUMER_KEY' | |
var PEM_KEY = '-----BEGIN RSA PRIVATE KEY-----'+ | |
'PEM_KEY'+ | |
'-----END RSA PRIVATE KEY-----'; | |
var payload = ''; | |
var URL = 'https://api.xero.com/api.xro/2.0/purchaseorders'; | |
var signatureBase = "GET" + "&" |
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
function getPO() { | |
var oauth_nonce = createGuid(); | |
var oauth_timestamp = (new Date().valueOf()/1000).toFixed(0); | |
var CONSUMER_KEY = 'CONSUMER_KEY' | |
var PEM_KEY = '-----BEGIN RSA PRIVATE KEY-----'+ | |
'PEM_KEY'+ | |
'-----END RSA PRIVATE KEY-----'; | |
var payload = ''; | |
var URL = 'https://api.xero.com/api.xro/2.0/purchaseorders'; | |
var signatureBase = "GET" + "&" |