User:ThePointless/APIMap

From Guild Wars 2 Wiki
Jump to navigationJump to search

This is an attempt at mapping out the GW2 API, primarily for my own benefit - I need to wrap my head around it and this is the best way I know how. However, this may benefit others. This is incomplete. Some data may be missing, and it would be appreciated if those blanks were filled in. I've tried to make it understandable in text form with indents

Key[edit]

*str = string. All of the numerical data provided comes in the form of strings, and will need to be converted to integer before using them in any maths. Some keys used to hold a string value have a list of strings below them on this page. Only one string from that list will be used as its value.
*{dict} = dictionary. Each entry follows the { key : value } format.
*[list] = list (or array, whichever suits you better). Keys shown with multiple strings nested below may use any and all of them.

Items[edit]

items.json[edit]

{dict}
	items = [list]				// True integers within. May need conversion to string before using in URLs etc.

item_details.json[edit]

{dict}
item_id = str						// Integer as string.
name = str
description = str
type = str
	Weapon						// Unique key: weapon
	UpgradeComponent				// Unique key: upgrade_component
	Trophy						// Unique key: trophy
	Trinket						// Unique key: trinket
	Tool						// Unique key: tool
	MiniPet						// No unique key
	Gizmo						// Unique key: gizmo
	Gathering					// Unique key: gathering
	CraftingMaterial				// Unique key: crafting_material
	Container					// Unique key: container
	Consumable					// Unique key: consumable
	Bag						// Unique key: bag
	Back						// Unique key: back
	Armor						// Unique key: armor
level = str						// Integer as string.
rarity = str
	Junk
	Basic
	Fine
	Masterwork
	Rare
	Exotic
	Ascended
	Legendary
vendor_value = str					// Integer as string - convert to int before doing any maths with it
game_types = [list]
	Activity
	Dungeon
	Pve
	Pvp
	PvpLobby					// Heart of the Mists?
	Wvw
flags = [list]
	NoSell						// Cannot be sold at vendor
	SoulbindOnAcquire				// Soulbind on Acquire
	AccountBound					// Account Bound
	NoSalvage					// Cannot be Salvaged
	NotUpgradeable					// Cannot be Upgraded
	Unique
	NoMysticForge					// Cannot be used in the Mystic Forge
	HideSuffix					// Hide the item's suffix
	SoulBindOnUse					// Soulbind on Use or Equip
	NoUnderwater					// Cannot be used underwater
restrictions = [list]
	Asura
	Human
	Charr
	Norn
	Sylvari
	Guardian
	Warrior

// Type-unique keys
weapon = {dict}
	type = str
		LongBow
		Pistol
		Warhorn
		Sword
		Staff
		Hammer
		Trident
		Scepter
		Speargun
		Mace
		Axe
		Torch
		Dagger
		Shield
		Harpoon
		Greatsword
		Rifle
		Focus
		ShortBow
		Toy
		TwoHandedToy
	suffix_item_id = str				// Integer as string.
	min_power = str					// Integer as string.
	max_power = str					// Integer as string.
	infusion_slots = [list]
		item = str
			(no content)
		flags = [list]
			Defense
			Offense
			Utility
	infix_upgrade = {dict}
		attributes = [list]
			(repeatable) = {dict}
				attribute = str		// Attribute name.
					CritDamage
					ConditionDamage
					Healing
					Vitality
					Power
					Toughness
					Precision
				modifier = str		// Integer as string.
		buff = {dict}
			skill_id = str			// Skill ID number?
			description = str		// Description of skill.
	defense = str					// Integer as string.
	damage_type = str
		Physical
		Fire
		Ice
		Lightning
upgrade_component = {dict}
	type = str
		Rune
		Default
		Sigil
		Gem
	suffix = str
		(see “Suffixes”)			// Too many suffixes to list here!
	infusion_upgrade_flags = [list]
		Defense
		Offense
		Utility
	infix_upgrade = {dict}
		attributes = [list]
			(repeatable) = {dict}
				attribute = str		// Attribute name
					CritDamage
					ConditionDamage
					Healing
					Vitality
					Power
					Toughness
					Precision
				modifier = str		// Integer as string.
		buff = {dict}
			skill_id = str			// Skill ID number? Integer as string.
			description = str		// Description of skill.
	flags = [list]
		HeavyArmor
		MediumArmor
		LightArmor
		Axe
		Dagger
		Focus
		Greatsword
		Hammer
		Harpoon
		LongBow
		Mace
		Pistol
		Rifle
		Scepter
		Shield
		ShortBow
		Speargun
		Staff
		Sword
		Torch
		Trident
		Trinket
		Warhorn
trophy = {dict}
	(no content)
trinket = {dict}
	type = str
		Ring
		Accessory
		Amulet
	suffix_item_id = str
	infusion_slots [list]
		item = str
			(no content)
		flags = [list]
			Defense
			Offense
			Utility
	infix_upgrade = {dict}
		attributes = [list]
			(repeatable) = {dict}
				attribute = str		// Attribute name.
					CritDamage
					ConditionDamage
					Healing
					Vitality
					Power
					Toughness
					Precision
				modifier = str		// Integer as string.
		buff = {dict}
			skill_id = str			// Skill ID number? Integer as string.
			description - str		// Description of skill.
tool = {dict}
	type = str
		Salvage
	charges = str
gizmo = {dict}
	type = str
		Default
		RentableContractNPC
		UnlimitedConsumable
gathering = {dict}
	type = str
		Logging
		Foraging
		Mining
crafting_material = {dict}?
	(no content)
container = {dict}
	type = str
		Default
		GiftBox
consumable = {dict}
	type = str
		Unlock
		AppearanceChange
		ContractNpc
		Food
		Booze
		Generic
		Halloween
		Immediate
		Transmutation
		Utility
	duration_ms = str				// Integer as string.
	description = str
bag = {dict}
	size = str					// Integer as string.
	no_sell_or_sort = str				// Boolean/binary value as string.
back = {dict}
	suffix_item_id = str				// Integer as string.
	infusion_slots = [list]
		item = str
			(no content)
		flags = [list]
			Defense
			Offense
			Utility
	infix_upgrade = {dict}
		attributes = [list]
			(repeatable) {dict}
				attribute = str		// Attribute name.
					CritDamage
					ConditionDamage
					Healing
					Vitality
					Power
					Toughness
					Precision
				modifier = str		// Integer as string.
		buff = {dict}
			skill_id = st			// Skill ID number? Integer as string.
			description = str		// Description of skill.
armor = {dict}
	weight_class = str
		Medium
		Light
		Heavy
		Clothing
	type = str
		Boots
		Helm
		Leggings
		Gloves
		Shoulders
		Coat
		HelmAquatic
	suffix_item_id = str				// Integer as string
	infusion_slots = list
		(no content)
	infix_upgrade = {dict}
		attributes = [list]
			(repeatable) = dict
				attribute = str		// Attribute name.
					CritDamage
					ConditionDamage
					Healing
					Vitality
					Power
					Toughness
					Precision
				modifier = str		// Integer as string.
		buff = {dict}
			skill_id = str			// Skill ID number? Integer as string.
			description = str		// Description of skill.
	defense = str					// Integer as string.

Suffixes[edit]

of the Rata Sum
of the Lich
of the Eagle
of Restoration
of Smothering
of Compassion
of Lingering
of Ice
of the Soldier
of the Berserker
of Grenth
of the Warrior
of the Explorer
of Rage
of the Cleric
of Venom
of Ravaging
of the Shaman
of the Guardian
of Honing
of Penetration
of Impact
of Luck
of the Traveler
of Orrian
of Ogre Slaying
of Chilling
of the Ranger
of Fire
of the Apothecary
of Scavenging
of the Hydromancer
of the Monk
of the Fighter
of Melandru
of Paralyzation
of Pillaging
of Strength
of the Stout
of the Scholar
of Divinity
of Earth
of Speed
of Elemental Slaying
of Potency
of Rejuvenation
of Hobbling
of the Rampager
of Lyssa
of Centar Slaying
of the Mad King
of the Water
of the Baelfire
of Sanctuary
of the Valkyrie
of the Noble
of the Necromancer
of the mesmer
of Mercy
of Peril
of the Rabid
of Air
of Accuracy
of Justice
of Serpent Slaying
of the Sentinel
of Agony
of Vampirism
of the Pirate
of the Golemancer
of the Afflicted
of the Krait
of Smoldering
of the Geomancer
of the Centaur
of Dreams
of Doom
of Battle
of the Ogre
of Heartiness
of Life
of Resilience
of Vigor
of Energy
of the Thief
of the Knight
of Festering
of Water
of Winter
of Destroyer Slayer
of Karka Slaying
of Carrion
of the Dolyak
of Dwayna
of the Night
of Force
of Bloodlust
of the Adventure
of the Undead
of Icebrood Slaying
of the Engineer
of Vitality
of the Magi
of the Nightmare
of Leeching
of Frailty
of the Forge
of Altruism
of the Flock
of Wrath
of Hoelbrak
of Demon Summoning
of Demon Slaying
of Undead Slaying
of the Citadel
of Might
of the Grove
of Balthazar
of the Elementalist
of Mending
of Debility
of Seeking
of Generosity
of Sorrow
of Svanir
of Grawl Slaying
of Ghost Slaying
of Infiltration
of the Pack
of Purity
of the Wurm
of Nullification
of Perception
of Intelligence
of Precision
of Corruption
of Blood
of Flame Legion
of Stamina

Recipes[edit]

recipes.json[edit]

{dict}
	recipes = [list]				// True integers within. May need conversion to string before using in URLs etc.

recipe_details.json[edit]

{dict}
recipe_id = str					// Integer as string
type = str
	// Weaponsmith
	Axe
	Dagger
	Hammer
	Greatsword
	Mace
	Shield
	Sword

	// Huntsman
	Harpoon
	LongBow
	Pistol
	Rifle
	ShortBow
	Speargun
	Torch
	Warhorn

	//Artificer
	Focus
	Potion
	Scepter
	Staff
	Trident

	//Chef
	Dessert
	Dye
	Feast
	IngredientCooking
	Meal
	Snack
	Soup
	Seasoning

	// Jeweler
	Amulet
	Earring
	Ring

	// Armorsmith, Leatherworker, Tailor
	Boots
	Coat
	Gloves
	Helm
	Insignia
	Leggings
	Shoulders
	Bag

	// Artificer, Huntsman, Weaponsmith
	Inscription

	// All professions (excluding Chef)
	Component
	Consumable
	Refinement
	UpgradeComponent

	// ?
	Bulk

"output_item_id" = str					// Integer as string
"output_item_count" = str				// Integer as string
"min_rating"						// Integer as string
"time_to_craft_ms"					// Integer as string
"ingredients" = [list]
	(repeatable) = {dict}
		item_id					// Integer as string
		count					// Integer as string

Events[edit]

event_names.json[edit]

NOTE: Duplicate names may relate to similar events in different locations and do not necessarily mean an bug or error.

[list]
	(repeatable) = {dict}
		id = str				// Event ID number. Hexadecimals.
		name = str

map_names.json[edit]

[list]
	(repeatable)  = {dict}
		id = str				// Integer as string.
		name = str

world_names.json[edit]

NOTE: IDs starting with 1 are NA worlds. Those starting with 2 are EU.

[list]
	(repeatable) = {dict}
		id = str				// Integer as string.
		name = str

events.json[edit]

{dict}
	events = [list]
		(repeatable) = {dict}
			world_id = str			// Integer as string.
			map_id = str			// Integer as string.
			event_id = str			// Hexadecimal.
			state = str
				Warmup
				Active
				Success
				Fail
				Preparation		// Does this one even exist? It's been used in someone's code before.

WvW[edit]

objective_names.json[edit]

[list]
	(repeatable) = {dict}
		id = str				// Integer as string
		name = str

matches.json[edit]

NOTE: World IDs of each belligerent are returned as true integers rather than strings. Conversion may be necessary before using them to draw the corresponding world name.

{dict}
	wvw_matches = [list]
		(repeatable) = {dict}
			wvw_match_id = str		// Integers as string, format: "x-y" (First number=region?).
			red_world_id = int		// See world_names.json
			green_world_id = int
			blue_world_id = int

match_details.json[edit]

NOTE Objective IDs are returned as true integers rather than strings. Conversion may be necessary before using them to draw the corresponding objective name.

{dict}
	match_id = str					// Integers as string, format "x-y" (First number=region?).
	scores = [list]					// Explicit integers within. Red, Green, Blue?
	maps = [list]
		(repeatable) = {dict}
			type = str
				RedHome			// Red Borderlands.
				GreenHome		// Green Borderlands.
				BlueHome		// Blue Borderlands.
				Center			// Eternal Battlegrounds.
			scores = [list]			// Explicit intergers within. Red, Green, Blue?
			objectives = [list]
				(repeatable) = {dict}
				id = int
				owner = str
					Red
					Green
					Blue
				owner_guild = str			// Hexadecimal. Only provided if objective owned by guild.