Skip to content

2019 10 API Updates for Sockets and Plugs (and removal of a long deprecated Stats property)

Vendal Thornheart edited this page Oct 17, 2019 · 3 revisions

As many of you know, we experienced problems handling requests for Socket and Plug data in the API as of the Shadowkeep launch, due to the inflation of this data by Armor 2.0.

We have made several changes to the API for our next deployment (tentatively 2019-10-29) to better accommodate the amount of data being returned.

Many of these changes are breaking: to continue supporting Sockets and Plugs, you will likely need to make changes to your own code to accommodate.

Branch with Swagger Specs for this 2.4.1 change: https://github.com/Bungie-net/api/tree/2.4.1

Branch with updated documentation (download to use): https://github.com/Bungie-net/Bungie-net.github.io/tree/2.4.1

Fake Plug Sets

We are now generating a large set of "Bungie.net sourced" plug sets. These "Fake" plug sets should behave the same as game sourced ones, with the caveat that their hash identifier should not be trusted to remain static between content versions. Fake Plug Sets will have a new "isFakePlugSet" property set to true in their DestinyPlugSetDefinition.

Recommended action: None, but be aware that plug set data will expand due to this change and item-scoped reusablePlug data will be significantly reduced. If you have not added support for plug sets yet, you will need to do so in order to support showing reusable plugs for sockets.

Moving of Plug Objective and Reusable Plug data from item-scoped "sockets" component into their own components

The DestinyItemSocketsComponent will no longer have the following sets of data:

  • reusablePlugHashes
  • reusablePlugs
  • plugObjectives

Therefore, the only data in the sockets component will now be data about the currently inserted plug. If you have already adapted to this change, which occurred during the first week of the Shadowkeep launch, then you should be compatible with these changes.

Two new components are being added. We ask that you do not attempt to acquire these components unless you actually need them for your use case:

  • ItemPlugObjectives

    • Returns data in a new "plugObjectives" property on the item components.
    • For each item that has plug objectives, this will contain a Dictionary with key being the plug's item hash, and the value being the list of DestinyObjectiveProgress for the related objectives on that plug.
  • ItemReusablePlugs

    • Returns data in a new "reusablePlugs" property on the item components.
    • For each item that has reusable plugs in any sockets, this will contain a Dictionary keyed by the SOCKET INDEX of the socket for whom these reusable plugs apply, and whose value is the list of DestinyItemPlugs that represent the item-scoped reusable plugs.

Recommended Action: Replace any code that was attempting to acquire this data from the "Sockets" component with code that accesses data from these new components. Consider whether your application needs Reusable Plug and Objective data, and please refrain from requesting it if you do not need it, or if your application could function just as well if you were to defer acquiring these components until you make a "GetItem" detail call when the user of your app is looking at the details of the item.

Removal of plugSources and plugSetHash from DestinyItemSocketState

We were returning these as convenience properties so that you didn't have to look up the item's socket definitions, however in an attempt to minimize plug and socket data we have determined that we should no longer return this data.

Recommended Action: If you were using these new properties, please revert to your prior functionality of looking up the socket definition to determine plug set information for the socket.

Removal of the deprecated "maximumValue" property from DestinyStat

This value has not had meaning ever since the "Armory" feature of Bungie.net was retired at the launch of Destiny 2, and has long been deprecated. We are going to be looking to retire deprecated properties in coming months, and this is the first of those properties that will be removed due to its long standing uselessness.

Recommended Action: If you were using this property... I'm not sure how you were using this property for anything. Please remove any code that was using this property, and let's pretend it never happened.

Conclusions

We apologize for the disruptions in functionality and the breaking changes caused by these socket and plug issues. We will be watching the above changes carefully to determine if further changes are needed, and will attempt to keep you all posted as further changes come around. Thank you for your patience during this turbulent time!