By simply typing “limit” into the search box, you’d find this:
The event data is updated in real-time, and there is no perceptible delay between an event state changing on the game server and it being updated in the API view.
Feel free to update as often as you’d like, though you probably don’t need to update more often than every 30 seconds or so.
also this: https://forum-en.gw2archive.eu/forum/community/api/How-Often-I-can-Access-the-api/2071877
This information may be useful, too:
Yes, please cache the results!
The names are guaranteed to be static between game patches/builds, but it’s possible for the list to grow between patches. The Events API, like the Item API, only shows events and maps that have been discovered by players.
So the ‘perfect’ logic would be to cache the results, and only do a lookup after a patch or if you don’t have a cached result for a particular event ID. And you probably don’t really need to do it between patches, as event names will rarely if ever change after being created.
Just got the idea that the current rank and rating could be handy in the world_names.json.
€:
guessing the scores right score from the scores array in the match_details response is a bit confusing since its in a different order than the maps, why not change it like that:
scores: {
red: 128115,
blue: 123980,
green: 188740
}
The maps array would also look better if it was of object type like:
maps: {
RedHome:{
scores: {
red: 128115,
blue: 123980,
green: 188740
},
objectives: {
objective_id: {
...
}
}
}
...
}
(edited by smiley.1438)
Please add the map_id to the event_names API – currently it’s a pain to find the right map for a given event (without a database driven backend) since its not assured that a given event is listed in the events response for a single world.
(edited by smiley.1438)
Thanks for the quick fix!
While updating my local items database i’ve found 5 IDs (43245-43249) which were added today and return a “reply not message” error. What does that mean?
https://api.guildwars2.com/v1/item_details.json?item_id=43249
Since this is pretty static data, you might try this: https://gist.github.com/codemasher/b3b26a77dd0681697c59
While we’re at it:
items which have more than one recipe:
Array
(
[0] => 24822
[1] => 24819
[2] => 24831
[3] => 24825
[4] => 24760
[5] => 24792
[6] => 24742
[7] => 24745
[8] => 24823
[9] => 24820
[10] => 24832
[11] => 24826
[12] => 24761
[13] => 24793
[14] => 24743
[15] => 24746
[16] => 24869
[17] => 24810
[18] => 24813
[19] => 24816
[20] => 24828
[21] => 24754
[22] => 24789
[23] => 24751
[24] => 24718
[25] => 24811
[26] => 24814
[27] => 24817
[28] => 24752
[29] => 24755
[30] => 24719
[31] => 24790
[32] => 24869
[33] => 24837
[34] => 24748
[35] => 24759
[36] => 24780
[37] => 24834
[38] => 24804
[39] => 24801
[40] => 24798
[41] => 24799
[42] => 24802
[43] => 24805
[44] => 24835
[45] => 24781
[46] => 24758
[47] => 24749
[48] => 24838
[49] => 24663
[50] => 24866
[51] => 24565
[52] => 24861
[53] => 24566
[54] => 24867
[55] => 24662
[56] => 24637
[57] => 24649
[58] => 24587
[59] => 24863
[60] => 24588
[61] => 24638
[62] => 24650
[63] => 24864
[64] => 24862
[65] => 24652
[66] => 24585
[67] => 24564
[68] => 24563
[69] => 24586
[70] => 24653
[71] => 24608
[72] => 36042
[73] => 36043
[74] => 36044
[75] => 36042
[76] => 36043
[77] => 36044
[78] => 36055
[79] => 36054
[80] => 36053
[81] => 36055
[82] => 36054
[83] => 36053
[84] => 38215
[85] => 38204
[86] => 38205
[87] => 38206
[88] => 38204
[89] => 38205
[90] => 38206
)
(edited by smiley.1438)
…
I scanned the source code and didn’t see anything malicious. Of course it’s still possible that the compiled executable could be dangerous even if an author provides the source. The safest route would be to compile the source yourself, if you are suspicious. However, most authors who go through the effort to publish their source code to GitHub are probably not malicious individuals.That is what I would do if I really want to use the program.
It’s always easy to say: hey, it’s open source, just go and read the code.
We both know that an average user of such a program won’t ever read the source because he won’t understand it anyway – he just downloads and executes it and the damage is done.
In short: No.
Event items are also missing, a lot of non-tradable items like our beloved Golem in a box too.
I know at one time during beta there was an item that different vendors sold for different amounts of coin.
Golem-In-A-Box is such an item – sold in Metrica Province at 2 different vendors for different price …and it’s missing in the Items-API :o
Your link points to the gw1 wiki
http://wiki.guildwars2.com/wiki/API/item_details <- correct link
Great work! Thanks!
Ok, i’m done with items and recipes:
(these may need to be updated from time to time)
(edited by smiley.1438)
I’ve forgot the chat code - i know we can calculate them on our own, but it would be more reliable to have them from the original source
For the items with type Consumable/Unlock, e.g. https://api.guildwars2.com/v1/item_details.json?item_id=9653
- recipe_id of the corresponding recipe which would be unlocked: 3182
- item_id of the crafted item, in this case: 12561
further for the recipes, example from above
https://api.guildwars2.com/v1/recipe_details.json?recipe_id=3182
- item_id of the Consumable which is required to unlock (if applies): 9653
and finally for craftable items
https://api.guildwars2.com/v1/item_details.json?item_id=12561
- recipe_id of the corresponding recipe: 3182
I don’t think that you fixed this, but someone else. Yesterday when i wrote my post it was broken on Chrome (27beta), Firefox (20) and IE10. Today it works on all of them :o
once we get a good objective_names.json file
I know, it’s not official, but it’s all you need – i believe, objectives are the least thing which will change
While we’re at it:
I’m a friend of “let the owner decide what info he wants to reveal” – this won’t need authorisation and would give people full control of their data. The only thing i’d like to see public would be a characters name. People would have to allow in their game options. So:
- Character name (public)
- Account name (user decision)
- Character location (user decision)
- Character data like achievements and stuff (user decision)
Personal stuff
- Friendlist (authorized)
- Chat (authorized)
- Messages (authorized)
- Inventory and chest? (authorized)
(edited by smiley.1438)
Ok, what i expect from a guild API:
- Guild name & Tag (public)
- Guild info & search tags (which may be specified by the leader ingame) (public)
- Ranking (public, doesn’t apply yet, eh?)
- Memberlist (authorized)
- Chat (authorized)
- Ability to queue upgrades, invite/kick members & stuff (authorized & if allowed ofc)
I couldn’t find any while browsing my wiki contributions - i believe most of them were translation errors which (hopefully) have been fixed in the meantime.
But i’ve found one special case: 3 recipes with the same name which create 3 different items with the same name:
http://wiki-de.guildwars2.com/wiki/Geheimtrank
http://wiki.guildwars2.com/wiki/Mystery_Tonic
Well, at least a lot recipe names differ from the actual crafted item in a rarity suffix. For example:
http://wiki-de.guildwars2.com/wiki/Perlen-Breitschwert
the recipe is named: Perlen-Breitschwert der Fäulnis (Exotisch)
the crafted item is named: Perlen-Breitschwert der Fäulnis
A few recipes have completely different names as far as i can remember.
On the other hand, there are still the recipe-items which unlock several recipes – it would be nice to get that info somewhere too.
Hmm, wouldn’t it be better to add the recipe names instead?
As for the world names, map names, etc. they hardly change so it makes sense for you to cache them too.
Thats why i’ve already created SQL and JSON for most of the static stuff
https://forum-en.gw2archive.eu/forum/community/api/SQL-data-for-static-stuff
Thanks for the quick response!
…and there we’ve killed the API
Page not found
Host
pubstats-live.ncplatform.net
URL
/v1/item_details.json?item_id=23250
Remote Address
84.162.253.193:15725
SpawnSrv/301.3051201 Instance/0.391033534
Hmm, i’ve posted the links as https and they got converted to http… I’m using chrome btw. – FF works indeed :o
That being said, the server does appear to be Microsoft’s IIS 7.5, which is an odd choice for RoR (Truth be told, I didn’t even know IIS+Passenger was possible; the preferred choice is Nginx/Apache+Passenger).
I believe the IIS is just a proxy – the application server may be a completely different
If you click an external link in the forum, you’ll get usually redirected to a warning-page. The link shown on this page is broken if it contains multiple query parameters, for example:
https://api.guildwars2.com/v1/item_details.json?item_id=27171&lang=de
the & (ampersand) will be converted to its HTML-entity and break the link that way.
The HOM page used to work for me, and now it doesn’t. I’ve attached a screenshot and the output of the Javascript console that shows some resources failing to load. If there’s any other digging I can do with the Chrome developer tools that might help, let me know.
Same here, a stylesheet throws a 404:
http://d1vgtq9y35ia05.cloudfront.net/combo/_/css/icons.2566666610.css&/css/main-page.2132454446.css&/css/reward-monitor.2790228197.css&
and firebug tells me “TypeError: A.Env._eventstack is null”, line 17 in http://yui.yahooapis.com/combo?3.2.0/build/oop/oop-min.js&3.2.0/build/event-custom/event-custom-min.js&3.2.0/build/attribute/attribute-base-min.js&3.2.0/build/pluginhost/pluginhost-min.js&3.2.0/build/base/base-min.js&3.2.0/build/dom/dom-base-min.js&3.2.0/build/dom/selector-native-min.js&3.2.0/build/dom/selector-css2-min.js&3.2.0/build/node/node-base-min.js&3.2.0/build/event/event-min.js&3.2.0/build/history/history-base-min.js&3.2.0/build/history/history-hash-min.js&3.2.0/build/json/json-min.js&3.2.0/build/cookie/cookie-min.js&gallery-2010.09.22-20-15/build/gallery-preload/gallery-preload-min.js
Have you discovered funny stuff you haven’t seen before while digging in the data?
I’ve just found “Fiat Lux” which is a phrase from the bible which means “let there be light” – right, it’s a torch. The funny thing is: the weapon is called Fiat Lux only in german which may be a pun on the swiss based cult led by Uriella.
Why is that funny? Well, go to youtube and check for yourself…
[…]
€: Why is there so much space between those links? :o
(edited by smiley.1438)
Item types is missing a bit:
Array
(
[0] => Armor
[1] => Back
[2] => Bag
[3] => Consumable
[4] => Container
[5] => CraftingMaterial
[6] => Gathering
[7] => Gizmo
[8] => MiniPet
[9] => Tool
[10] => Trinket
[11] => Trophy
[12] => UpgradeComponent
[13] => Weapon
)
Recipe-types
Array
(
[0] => Amulet
[1] => Axe
[2] => Bag
[3] => Boots
[4] => Bulk
[5] => Coat
[6] => Component
[7] => Consumable
[8] => Dagger
[9] => Dessert
[10] => Dye
[11] => Earring
[12] => Feast
[13] => Focus
[14] => Gloves
[15] => Greatsword
[16] => Hammer
[17] => Harpoon
[18] => Helm
[19] => IngredientCooking
[20] => Inscription
[21] => Insignia
[22] => Leggings
[23] => LongBow
[24] => Mace
[25] => Meal
[26] => Pistol
[27] => Potion
[28] => Refinement
[29] => Rifle
[30] => Ring
[31] => Scepter
[32] => Seasoning
[33] => Shield
[34] => ShortBow
[35] => Shoulders
[36] => Snack
[37] => Soup
[38] => Speargun
[39] => Staff
[40] => Sword
[41] => Torch
[42] => Trident
[43] => UpgradeComponent
[44] => Warhorn
)
(edited by smiley.1438)
I’ve added the spanish translations and a .json to my gist:
https://gist.github.com/codemasher/bac2b4f87e7af128087e
re the map names: i’ve kept them short since they’re for internal use only, you’ll need to add translation anyway if you want to use them out of the DB – i didn’t want to add 3 more columns for just 4 different words
several item names contain double spaces like: https://api.guildwars2.com/v1/item_details.json?item_id=1794&lang=fr
I don’t see any double spaces in this example. If any exist, it’s likely an issue in the original item data too.
I’ve seen a lot of double spaces especially in spanish and french translations – the original response to the above request looks like this, take a look on Manteau de voleur solide de l’aigle:
{"item_id":"1794","name":"Manteau de voleur solide de l'aigle","description":"","type":"Armor","level":"60","rarity":"Rare","vendor_value":"234","game_types":["Activity",
"Dungeon",
"Pve",
"Wvw"],"flags":[],"restrictions":[],"armor":{"type":"Coat","weight_class":"Medium","defense":"202","infusion_slots":[],"infix_upgrade":{"buff":"","attributes":[{"attribute":"Power","modifier":"58"},
{"attribute":"Precision","modifier":"41"}]},"suffix_item_id":"24722"}}
€: it seems that most of the items with a suffix are affected (~4.5k) – there is a double space before the suffix. Oh, and there is one german item with a double space: https://api.guildwars2.com/v1/item_details.json?item_id=20286&lang=de
Some other items have HTML-like markup in their descriptions like https://api.guildwars2.com/v1/item_details.json?item_id=29175
Any strip_tags function should remove it, but it doesn’t look good or may break code if it’s not removed.That’s intentional, though it should probably be better documented in the future since it’s a completely custom markup. If your goal is to re-create an item’s information box to look like it does in the game, you’ll need those tags to show the right color or style for the text.
I thought that this is intentional, a documentation of that would be nice
(edited by smiley.1438)
What the title says. (may someone sticky it, thanks)
I just stumbled across a minor error:
several item names contain double spaces like: https://api.guildwars2.com/v1/item_details.json?item_id=1794&lang=fr
It’s nothing that hurts, but still an error.
Some other items have HTML-like markup in their descriptions like https://api.guildwars2.com/v1/item_details.json?item_id=29175
Any strip_tags function should remove it, but it doesn’t look good or may break code if it’s not removed.
Images in signatures aren’t allowed anyway.
Nice work btw. – i must admit, i love stats signature images – i love to create stuff like this too
kinda OT but: http://worldofpadman.net/website/servers/image/78.46.97.51:27961/2.png
Y U NO LOOK FOR EXISTING THREAD?
https://forum-en.gw2archive.eu/forum/community/api/WvW-objective-names
;)
Hey,
i’ve created some SQL tables for the static data in order to cache results and reduce API requests like Cliff recommended over here. Currently i have tables for events, maps, worlds and WvW objectives, recipes and items are still WIP since these are huge databases :o
- Events: https://gist.github.com/codemasher/b0abd0f0a7a3781c6907
- Maps (+.json): https://gist.github.com/codemasher/dc3b232b3ccd2609a43b
- Worlds (+.json): https://gist.github.com/codemasher/b3b26a77dd0681697c59
- WvW-Objectives (+.json): https://gist.github.com/codemasher/bac2b4f87e7af128087e
Let me know if you need this in a different format, e.g. XML, CSV or even Excel…
Happy coding!
(edited by smiley.1438)
There are alot of reason to not query all the languages at all times.
This may be true for the events list which would grow huge if it delivers all languages but for those detailed requests it may be fine
simple calculation:
the original response is ~650 bytes
this * 4 languages * ~25k items = 65MB traffic
the response i suggested is ~1050 bytes
this * ~25k items = 26.25MB traffic and 1/4 of the requests
(edited by smiley.1438)
Oh, while we’re at it: what about adding all languages to a response instead of retrieving 4 responses? So that a response for https://api.guildwars2.com/v1/item_details.json?item_id=29175 would look like this:
{
item_id: "29175",
name: {
de: "Der Jäger",
en: "The Hunter",
es: "El Cazador",
fr: "Le chasseur"
}
description: {
de: "<c=@flavor>Diese Waffe wird verwendet, um das legendäre Gewehr "Das Raubtier" zu fertigen</c>",
en: "<c=@flavor>This weapon is used to craft the legendary rifle The Predator</c>",
es: "<c=@flavor>Esta arma se usó para forjar el legendario rifle El Depredador</c>",
fr: "<c=@flavor>Cette arme sert à fabriquer le légendaire fusil Prédateur.</c>"
}
type: "Weapon",
level: "80",
rarity: "Exotic",
vendor_value: "396",
game_types: [
"Activity",
"Dungeon",
"Pve",
"Wvw"
],
flags: [
"HideSuffix"
],
restrictions: [ ],
weapon: {
type: "Rifle",
damage_type: "Physical",
min_power: "986",
max_power: "1205",
defense: "0",
infusion_slots: [ ],
infix_upgrade: {
buff: "",
attributes: [
{
attribute: "Power",
modifier: "179"
},
{
attribute: "Precision",
modifier: "128"
},
{
attribute: "CritDamage",
modifier: "9"
}
]
},
suffix_item_id: "24561"
}
}
This way you could reduce requests and traffic beside making our lives easier
(edited by smiley.1438)
I’ve collected some data (thanks to millenium.org ) and threw it into a DB. However, spanish tanslation is still missing – anyone here to help out?
Just noticed, that the recipe_details API doesn’t return a name for a given id – so, please add the name and also the item_id for the recipe-item which unlocks the given recipe (if applies)
https://api.guildwars2.com/v1/recipe_details.json?recipe_id=1&lang=en
protip: try the [pre] tag to post code
What i’ve written just one post before applies also to your first code example.
- Events
- add map_id to the event_names response
I’m currently creating a local database for most of the static stuff – a corresponding map_id for every event would make life easier.
- Items
- Item codes used to link items ingame
Well, you can calculate the Itemcodes on your own (ofc it would be easier to get them via the API…)
http://wiki.guildwars2.com/wiki/Chat_link_format
http://wiki-de.guildwars2.com/wiki/Benutzer:Drake_Shadowstorm/Sandkasten7
- New API suggestions
- Requesting guildnames
Suggested feature ingame: guild leaders may add additional info and tags which could be used for an advanced search aka. guild recruitment tool.
Then, on the other hand, would be a lot more to fix… ;D
In case you run the data through a script (which is the case in 99.9% i guess) then it’s not too hard to strip tags while you’re at it.
Hmm…
http://php.net/manual/en/function.strip-tags.php
http://api.prototypejs.org/language/String/prototype/stripTags/
something like this may help