Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save a-klimashevsky/0b506efe6e6922177f26b14f22c09388 to your computer and use it in GitHub Desktop.
Save a-klimashevsky/0b506efe6e6922177f26b14f22c09388 to your computer and use it in GitHub Desktop.
Albion Price google sheets script
function albionPrice(itemId, location, type) {
var url = "https://www.albion-online-data.com/api/v2/stats/prices/"+itemId+"?locations="+location
var response = UrlFetchApp.fetch(url);
var json = JSON.parse(response.getContentText());
if(type === 'sell'){
return json[0].sell_price_min;
} else {
return json[0].buy_price_max;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment