Making your first Request
This page will provide you with a short Tutorial on how to make your first Request to a Weapon Endpoint.
We will try and GET all of the Information for the Handcannon "Eyasluna".
In this Example the "235827225" is the Hash of the Weapon. A Weapon Hash is a unique Identifier for an API-Item and is imposed by Bungie on all Items.
The URL will look like this:
https://destiny.izanami.dev/v1/weapon/235827225
Javascript Code:
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("https://api.izanami.dev/destiny/v1/weapon/235827225", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
This will produce a Response like this:
{
"statusName": "Ok",
"isError": false,
"statusCode": 200,
"msg": {
"hash": 235827225,
"collectibleHash": 1042746134,
"name": "Eyasluna",
"classType": 3,
"classTypeName": "Unknown",
"itemType": 3,
"itemTypeName": "Weapon",
"damageType": 151347233,
"damageTypeName": "Stasis",
"ammoType": 1,
"ammoTypeName": "Primary",
"equipmentSlot": 1498876634,
"equipmentSlotName": "Kinetic Weapons",
"breakerType": 0,
"breakerTypeName": "None",
"specialItemType": 0,
"specialItemTypeName": "null",
"powerCap": 999990,
"sourceString": "Source: 'Grasp of Avarice' Dungeon",
"collectibleIcon": "/common/destiny2_content/icons/6a71ffaef39e6bad084b933b3f034ce6.jpg",
"itemSubTypeName": "Hand Cannon",
"itemSubType": 9,
"tierType": "Legendary",
"isRandomlyRolled": 1,
"icon": "235827225/collectible/icon",
"perks": [
{
"hash": 1294026524,
"perkName": "Adaptive Frame",
"column": 1,
"description": "A well-rounded grip, reliable and sturdy.",
"perkExplanation": "501 - Not Implemented",
"statArea": []
}
],
"stats": [
{
"statName": "Stability",
"statValue": 64,
"statHash": 155624089,
"statExplanation": "501 - Not Implemented"
}
],
// Editors Note: Rendering every possible Stat and Perk in
// here would be a bit to long, so you will find more
// information on the Next Page
}
}
Endpoints
While you will be able to make a request to the General Item Endpoint and still get this response, the specialized Endpoints are generally much faster and mor responsive.
Whew, that looks like a lot, but it's not actually that complicated. Let's break it down on the next Page.