AllynH / Destiny_Get_Xur_inventory

Using Bungies Destiny API to get Xurs inventory.
3 stars 2 forks source link

Update? #3

Open dinosaw opened 5 years ago

dinosaw commented 5 years ago

Any chance you can update this script to work? I'd love it! Right now when I run it, I get:

Connecting to Bungie: https://www.bungie.net/Platform/Destiny/Advisors/Xur/

Fetching data for: Xur's Inventory!
Error status: DestinyVendorNotFound

##################################################
## Printing Xur's inventory:
##################################################
Traceback (most recent call last):
  File "xur.py", line 40, in <module>
    for saleItem in res.json()['Response']['data']['saleItemCategories']:
KeyError: 'Response'
adampatterson commented 2 years ago

AKAIK Bungie removed Xur as a vendor.

Everything I found seems to lean on physical people making an update on a handful of sites and then those sites being scrapped for other sites.

AllynH commented 2 years ago

Hi @dinosaw I never saw your message. I'm very sorry.

AllynH commented 2 years ago

AKAIK Bungie removed Xur as a vendor.

Everything I found seems to lean on physical people making an update on a handful of sites and then those sites being scrapped for other sites.

Hi @adampatterson

This code was based on the Destiny 1 API, all of my the development work has moved to Destiny 2. In Destiny 2, Xûr's inventory is available via the Vendors endpoint, just like any other Vendor. Bungie no longer reveal Xûrs location via the API and I believe some developers have patched together their own work arounds for that.

adampatterson commented 2 years ago

@AllynH oh thanks for clearing that up!

I looked for a while at the new API and its sort of greek to me. I'll have a look at the vendor's endpoint then. Last I remember I need to pass in components or something like that.

AllynH commented 2 years ago

Off the top of my head: when using the getProfile endpoint you can add a component parameter to also include vendor information in the response. You can also check the getVendors endpoint for all, or a specific vendor, see here for Xûr: https://data.destinysets.com/i/Vendor:2190858386

I'm not 100% on the endpoint details right now.

Just FYI - if you're interested in the Destiny development side of things there is a very active Discord channel here: https://discord.gg/E5uB4BW

adampatterson commented 2 years ago

Thanks, I last looked into this a few years ago when the plumbing API was around, it was nice not needing the manifest to make sense of the API.