fuzzysteve / eve-googledocs-script Goto Github PK
View Code? Open in Web Editor NEWSomewhere to stick functions for googledocs
License: MIT License
Somewhere to stick functions for googledocs
License: MIT License
Hi Fuzzy,
I have been using your EveCentralPrices script for a while now, specifically the loadSystemPrices function, and it has been working flawlessly except for the last few days. When trying to load the function, I get TypeError: cannot call method "getChildren" of null. I have pasted below a link to part of my google spreadsheet.
https://docs.google.com/spreadsheets/d/11FVbKo-kRiFaCBdAQs4TnfBZwxz9HaxkWVUcCK3kzf4/edit?usp=sharing
If you could help me resolve this I'd greatly appreciate it.
hey =)
i've done everything like you've written, but when i'm hitting "updateCorpWallet", only the transactions are filled in. The corpjournal sheet stays empty.
Any solutions?
Greetings o7
I get an error from the import using assetList().
it says Error on line 18: The element type "link" must be terminated by the matching end-tag" . (line 223).
Hello!
can u help such problem? i use this manual
https://www.fuzzwork.co.uk/2017/03/14/using-esi-google-sheets/
but i can see onlne 5000 positions. how load all market on citadel?
If this is correct can you put it in the top of your code?
Please explain how to paste properly this? https://www.fuzzwork.co.uk/blueprint/massEntry.php
Hi
I have been trying to get your esiwalletpull to work, but i am having trouble With getting the CHARACTERID, i have try to use the following lookup =IMPORTDATA("https://esi.tech.ccp.is/latest/search/?search=J%J&categories=character&language=en-us&strict=true&datasource=tranquility"), and i get some weard Numbers that is NOT working in the script, i get a error saying that the id do NOT match the token.
Do you have an idea to what i am doing wrong, or am i getting the characterid the wrong Way.
Error
Request failed for https://api.eveonline.com/char/Blueprints.xml.aspx?keyID=6810907&vCode=BU1DTvQsVtzzcJtKkkuBZwCd0DXVGmNcIJqvf4EV6gF0HVPUmdNi3J493h9hbbJl&characterID=2113381903 returned code 403. Truncated server response: 2018-03-17 23:05:28 Illegal page re... (use muteHttpExceptions option to examine full response). (line 22).
Error, "data" is not defined for the =loadallvolumes function.
Hi Steve, I'm looking at a couple of options for calling price and adjusted values and have a couple of questions:
a) Would it be possible for you to add the ability to pull the adjusted price of items,
b) I've always had issues hitting the URLFETCH limit of 20,000 - is a single cell function classed as "one URLfetch call", or each column of data, or even each unit of data from the results?
Thanks
I created a new script in the script editor and copied the EveCentralPrices.gs script, however google docs doesn't autocomplete the function loadXPrices or return values for them when they are entered. I get an error telling me the reference does not exist. You can see the doc I'm trying to use it in here:
https://docs.google.com/spreadsheets/d/1-i6Sy9JHtZtKPEkGd1mjb9xHkKhykRHXL5UkHcPZvx8/edit?usp=sharing
Shots in the dark:
Running script in editor returns error 'need typeids' from line 46 or 111.
adding;
var priceIDs =34;
to start of function in hopes of debugging it returns same error. No idea what I'm going in Java though.
The Eve Central Prices.gs has a couple of bugs.
Does not pull more than 100 items.
LoadSystemPrices only works when you do NOT pass system id or cachebuster
Test google docs spread sheet at https://docs.google.com/spreadsheets/d/1THDS9buzVfWWlLaPiRCjBeVbIm-5y5Gv4natd7o9U4E/edit#gid=0
Fix incoming as a fork if I can work out how to save it properly
I am just wondering is it possible to get prices from system not region in ur latest 20 days old script.
Thank you
Between each iteration of UrlFetchApp, google now wants us to put a speed limiter.
While my spreadsheet is based on an older version of the scripts, I assume the same problem still applies.
Google docs now explicitly asks for a Utilities.sleep(1000) between url fetches, and while it still a long time, my errors have disappeared (for the time being at least)
Example function :
function loadRegionBuySell(priceIDs, regionID, cachebuster) {
var vRegionId, vcachebuster;
if (typeof regionID == 'undefined'){
vRegionId=10000002;
} else {
vRegionId = regionID
}
if (typeof priceIDs == 'undefined'){
throw 'need typeids';
}
if (typeof priceIDs == 'undefined'){
throw 'need typeids';
}
if (typeof cachebuster == 'undefined'){
vcachebuster=1;
} else {
vcachebuster=cachebuster
}
var prices = new Array();
var dirtyTypeIds = new Array();
var cleanTypeIds = new Array();
var url = "http://api.eve-central.com/api/marketstat?cachebuster=" + vcachebuster + "®ionlimit="+vRegionId+"&typeid=";
priceIDs.forEach(function (row) {
row.forEach(function (cell) {
if (typeof(cell) === 'number') {
dirtyTypeIds.push(cell);
}
});
});
cleanTypeIds = dirtyTypeIds.filter(function (v, i, a) {
return a.indexOf(v) === i;
});
var parameters = {
method : "get",
payload : ""
};
var i,j,k,temparray,chunk = 50,maxrow=500;
for (i=0,j=cleanTypeIds.length; i < j && i <maxrow; i+=chunk) {
temparray = cleanTypeIds.slice(i, i + chunk);
var xmlFeed = UrlFetchApp.fetch(url + temparray.join("&typeid="), parameters).getContentText();
var xml = XmlService.parse(xmlFeed);
if (xml) {
var rows = xml.getRootElement().getChild("marketstat").getChildren("type");
for (var k = 0; k < rows.length; k++) {
var price = [
parseFloat(rows[k].getChild("buy").getChild("max").getValue()),
parseFloat(rows[k].getChild("sell").getChild("min").getValue())];
prices.push(price);
}
}
Utilities.sleep(1000)
}
return prices;
}
I now need to cache.
function cacheUrlFetchApp(fetchUrl, parameters){
// Set up public cache
var cache = CacheService.getScriptCache();
// Turn the requested URL into a string based on the MD5.
var digest = Utilities.base64Encode(Utilities.computeDigest(Utilities.DigestAlgorithm.MD5, fetchUrl));
// Based on this MD5, lookup the URL in the cache
var cached = cache.get(digest);
// If a result has been already cached, use it
if (cached != null) {
return cached;
}
// Fetch the url
var resultXML = UrlFetchApp.fetch(fetchUrl,parameters);
// Don't call too quickly, google gets sad. Still pushing it a little
Utilities.sleep(100);
// Get the text of the URL call
var result =resultXML.getContentText();
// Cache the result
cache.put(digest,result,21600) //maximum cache time is 6 hours, or 21600 seconds.
// return the result
return result;
}
in the load system prices, instead of calling var xmlFeed = UrlFetchApp.fetch(url + temparray.join("&typeid="), parameters).getContentText();
I now call var xmlFeed = cacheUrlFetchApp(url + temparray.join("&typeid="), parameters);
I tried to use the code in a google spreadsheet and I believe I'm missing something. I am a total rookie on spreadsheet formulas, please help.
In google-docs i insert market prices script and do trigger on 5 min, also 3 param is 1 in function but prices don`t update((
Hi
I am trying to get the walletpull to work, but i have to make a new token in postman every time, is there some thing i have misunderstod abort the Way the refesh token work, i just get a exspired the nemt Day, i try to refresh the wallet journey.
Best regards
J J
Would be grat to tweak it, so it only shows active orders!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.