SHOW:
|
|
- or go back to the newest paste.
| 1 | function GetItemSellValue(itemID) {
| |
| 2 | var myUrl = "http://www.gw2spidy.com/api/v0.9/json/item/" + escape(itemID); | |
| 3 | var jsonData = UrlFetchApp.fetch(myUrl); | |
| 4 | var jsonString = jsonData.getContentText(); | |
| 5 | var jsonObject = JSON.parse(jsonString).result; | |
| 6 | var adjustedValue = (jsonObject.min_sale_unit_price / 100); | |
| 7 | return adjustedValue; | |
| 8 | } | |
| 9 | ||
| 10 | ||
| 11 | function GetItemBuyValue(itemID) {
| |
| 12 | var myUrl = "http://www.gw2spidy.com/api/v0.9/json/item/" + escape(itemID); | |
| 13 | var jsonData = UrlFetchApp.fetch(myUrl); | |
| 14 | var jsonString = jsonData.getContentText(); | |
| 15 | var jsonObject = JSON.parse(jsonString).result; | |
| 16 | var adjustedValue = (jsonObject.max_offer_unit_price / 100); | |
| 17 | return adjustedValue; | |
| 18 | } |