JavaScript is required to use Bungie.net

Group Avatar

BungieNetPlatform

"Updates, discussions, and documentation of the BungieNetPlatform API."

Request Join
originally posted in:BungieNetPlatform
Edited by Abu3safeer: 3/25/2016 8:32:30 PM
2

about XUR

Hello everyone i am wondering if XUR has fixed 'eventHash' which is 5 or use 'eventIdentifier' which is "SPECIAL_EVENT_BLACK_MARKET" because i want to check if Xur is available

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

View Entire Topic
  • Here is how I do it in Python The check: if eventHash == "SPECIAL_EVENT_BLACK_MARKET": xurItemList, xurItemHash = getXurItems() else: xur = None The get: def getXurItems (): url = "https://www.bungie.net/platform/Destiny/Advisors/Xur/" r = requests.get(url, headers=apiheaders) xurManifest = r.json() xurItemsList = [] xurItemsHash = [] if xurManifest['ErrorCode'] != 1: xurItemsList = ["Xur recalled"] else: xurItemHashID = [xurManifest['Response']['data']['saleItemCategories'][2]['saleItems'][i]['item']['itemHash'] for i in range(0, 5)] for i in range(len(xurItemHashID)): xurItemsList.append(getInventoryItem(xurItemHashID[i])) xurItemsHash.append(xurItemHashID[i]) return (xurItemsList, xurItemsHash)

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

You are not allowed to view this content.
;
preload icon
preload icon
preload icon