JavaScript is required to use Bungie.net

#api

originally posted in:BungieNetPlatform
11/13/2015 5:53:58 PM
2

What is the proper way to query the manifest?

In order to learn the API I'm working with a little application that is showing the currently equipped gear on all characters on an account using the /{membershipType}/Account/{destinyMembershipId}/Items service. This returns a json object with all equipped gear that I deserialize into a dynamic object in C#. That works great, but all of the items are returned as Item Hashes. So what I'm currently doing is using a foreach loop to iterate over each item and calling /Manifest/IntentoryItem/{ID} using each hash, which returns the name and everything else I want to know about that item. This also works, but it is needless to say very slow and I'm certain it is bad practice because widespread use of this technique would be quite taxing on the API. In short, this can't possibly be the right way to do it. So what do you guys do? I have downloaded the manifest file and I can access it with a little Sqlite browser I downloaded. Should I upload the latest manifest file to my site directory and call it to get the item from there through ODBC? That would be faster and would eliminate a bunch of API calls, but then I have to somehow ensure I always have the latest manifest. Any guidance would be appreciated.

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
  • I have a script that checks for manifest updates and extracts the definitions from the sqlite db and re-exports everything in pure JSON, broken down into individual chapters and individual items, hosted by GitHub (https://github.com/nmlorg/destiny-db). The full dictionary is available at https://nmlorg.github.io/destiny-db/definitions.json, individual chapters are available at URLs like https://nmlorg.github.io/destiny-db/definitions/Gender.json, and individual items like https://nmlorg.github.io/destiny-db/definitions/GrimoireCard/101005.json. If you capture the Last-Modified header from the response and include an If-Modified-Since header in your request, with the value from the previous fetch's Last-Modified, it will return a 304 Not Modified status if there's been no change, otherwise a 200 OK with the new content (and a new Last-Modified).

    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