SHOW:
|
|
- or go back to the newest paste.
| 1 | - | Original script: |
| 1 | + | |
| 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 | - | Separate connections: |
| 13 | + | |
| 14 | - | function GetItem(itemID) {
|
| 14 | + | |
| 15 | var jsonObject = JSON.parse(jsonString).result; | |
| 16 | - | var jsonData = UrlFetchApp.fetch(myUrl); |
| 16 | + | var adjustedValue = (jsonObject.max_offer_unit_price / 100); |
| 17 | return adjustedValue; | |
| 18 | - | return jsonObject; |
| 18 | + | |
| 19 | ||
| 20 | ||
| 21 | - | function GetItemExchangeValue(jsonObject) {
|
| 21 | + | function GetItemImg(itemID) {
|
| 22 | - | return(jsonObject.min_sale_unit_price / 100) |
| 22 | + | |
| 23 | var jsonData = UrlFetchApp.fetch(myUrl); | |
| 24 | var jsonString = jsonData.getContentText(); | |
| 25 | var jsonObject = JSON.parse(jsonString).result; | |
| 26 | var adjustedValue = (jsonObject.img); | |
| 27 | - | GW2 v2 API: |
| 27 | + | return adjustedValue; |
| 28 | - | function Test(itemID) {
|
| 28 | + |