Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetItemSellValue(itemID) {
- var myUrl = "http://www.gw2spidy.com/api/v0.9/json/item/" + escape(itemID);
- var jsonData = UrlFetchApp.fetch(myUrl);
- var jsonString = jsonData.getContentText();
- var jsonObject = JSON.parse(jsonString).result;
- var adjustedValue = (jsonObject.min_sale_unit_price / 100);
- Utilities.sleep(1000);
- return adjustedValue;
- }
- function SalePriceChangedLastHour(itemID) {
- var myUrl = "http://www.gw2spidy.com/api/v0.9/json/item/" + escape(itemID);
- var jsonData = UrlFetchApp.fetch(myUrl);
- var jsonString = jsonData.getContentText();
- var jsonObject = JSON.parse(jsonString).result;
- var adjustedValue = (jsonObject.sale_price_change_last_hour / 100);
- Utilities.sleep(1000);
- return adjustedValue;
- }
- function GetItemBuyValue(itemID) {
- var myUrl = "http://www.gw2spidy.com/api/v0.9/json/item/" + escape(itemID);
- var jsonData = UrlFetchApp.fetch(myUrl);
- var jsonString = jsonData.getContentText();
- var jsonObject = JSON.parse(jsonString).result;
- var adjustedValue = (jsonObject.max_offer_unit_price / 100);
- Utilities.sleep(1000);
- return adjustedValue;
- }
- function OfferPriceChangedLastHour(itemID) {
- var myUrl = "http://www.gw2spidy.com/api/v0.9/json/item/" + escape(itemID);
- var jsonData = UrlFetchApp.fetch(myUrl);
- var jsonString = jsonData.getContentText();
- var jsonObject = JSON.parse(jsonString).result;
- var adjustedValue = (jsonObject.offer_price_change_last_hour / 100);
- Utilities.sleep(1000);
- return adjustedValue;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement