Comments (2)
Here is my feeble and uninformed attempt (throws an error - "server was not able to produce a timely response"):
function sellOrdersAmount(priceIDs,systemID,cachebuster){
if (typeof systemID == 'undefined'){
systemID=30000142;
}
if (typeof priceIDs == 'undefined'){
throw 'need typeids';
}
if (typeof cachebuster == 'undefined'){
cachebuster=1;
}
var order_amounts = new Array();
var dirtyTypeIds = new Array();
var cleanTypeIds = new Array();
var url="http://api.eve-central.com/api/quicklook?cachebuster="+cachebuster+"&usesystem="+systemID+"&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 : ""};
for (var j = 0; j < cleanTypeIds.length; j++) {
var xmlFeed = UrlFetchApp.fetch(url, parameters).getContentText();
var xml = XmlService.parse(xmlFeed);
if(xml) {
for(var i = 0; i < item_amount; i++) {
var order_amount = xml.getRootElement().getChild("quicklook").getChildren("sell_orders").length;
order_amounts.push(order_amount);
}
}
}
return order_amounts;
}
from eve-googledocs-script.
This is really getting into potentially large data, which isn't particularly suited to spreadsheet functions. (especially not google, with process limits)
I'd highly recommend looking into something which downloads the market into a local database instead, and queries there.
from eve-googledocs-script.
Related Issues (20)
- Code not working in my sheet , what am I doing wronge HOT 2
- Blueprints.gs could cross-reference the locationID with a station list to provide the names of the stations or the name of the system
- Funtions not available after script save HOT 4
- Is there a way to exclude fulfilled Orders from the Output of the OrdersScript HOT 1
- Hi :D Fuzzworks prices menu HOT 1
- loadSystemPrices not loading properly due to getChildren error HOT 1
- CHARACTERID, can´t find it HOT 2
- Refresh toaken fails HOT 1
- I dont understand how to use Mass Calculation from fuzzwork
- Instructions
- I think the API may be broken HOT 1
- URLFetch
- updateCorpWallet not getting journal informations HOT 1
- citadels market
- Google Docs complaining about looping too quickly
- Too many calls for fetchApp HOT 2
- Problem using assetlist HOT 1
- History grabber
- Problem with update prices HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eve-googledocs-script.