These forums have been archived and are now read-only.
The new forums are live and can be found at https://forums.eveonline.com/
Google Script to get access_token and fetch citadel market orders
function getESIData(structureID, page) {//sends refresh token and gets a refreshed acess tokenvar refreshurl = 'https://login.eveonline.com/oauth/token?' + 'grant_type=refresh_token' + '&refresh_token=REFRESHTOKEN';var headers = { 'Authorization': 'Basic AUTHORIZATIONCODE] ', 'Content-Type': 'application/x-www-form-urlencoded', };var options = { 'method': 'post', 'headers': headers, };var response = UrlFetchApp.fetch(refreshurl, options);var refresh_raw = response.getContentText();var refresh_parse = JSON.parse(refresh_raw);var acess_token = refresh_parse['access_token'];//getting the esi citadel market data with the refreshed access tokenvar esi_url = 'https://esi.tech.ccp.is/latest/markets/structures/'+structureID+'/?page='+page+'&datasource=tranquility';var esi_headers = { 'Authorization': 'Bearer '+auth_token, 'Accept': 'application/json' };var esi_options = { 'method': 'GET', 'headers': esi_headers, };var esi_response = UrlFetchApp.fetch(esi_url, esi_options);//var esi_raw = esi_response.getContentText();//var esi_parse = JSON.parse(esi_raw);return esi_response;//after this I pump return into the popular importJSON script for filling the spreadsheet}
The above message presents my opinions on the topic at hand. If there is a conflict between my views and reality, consider reality to be correct until proven otherwise.