(edited by smiley.1438)
Processing and returning the same result more than once is just stupid. Assigning the result rows to the requested identifiers can be easily handled on the client side.
The output is incorrect, but returning output other than what is requested is also incorrect. I don’t expect a fish when I ask for a basket of eggs.
You get what you’ve asked for. You wanted $identifier X, you get the data for it. Once. Even if you send it a thousand times, the data will still stay the same.
As far as we know the quagans where perhaps still disabled and they just forget to lock them up again.
Who is “we” and where do you know from?
(edited by smiley.1438)
So you really expect the API to do something like that:
foreach($identifiers as $identifier){
SELECT * FROM table WHERE id = $identifier
}
A programmer who writes API backend code like that should be hung by the balls.
(edited by smiley.1438)
We’ve already established that they are not using that particular SQL construct. Otherwise we wouldn’t be getting duplicate objects in the response content.
And we agreed that the output is incorrect. This doesn’t invalidate my previous point:
Keep that SQL in mind, this is actually what to expect as response when duplicate identifiers are sent.
SELECT * FROM table WHERE id IN(404,404,404,404)
This is totally valid and would return exactly one line.
(edited by smiley.1438)
Honestly, i don’t care how YOUR program works. If it’s unable to handle the response to what it asked for, you should rewrite it. Keep that SQL in mind, this is actually what to expect as response when duplicate identifiers are sent.
You suggest that I should be allowed to request ?ids=404,404,404 but get only a single response object even though my program is expecting three objects? Nope, nope, nope, so much nope.
So does SQL. If you really think the API should act in a way YOUR program expects it to work, you’re wrong.
So tell me why:
- should the API return an error
- should it return the SAME object more than once
when you sent duplicate identifiers? How would your program handle the result of a SQL “…WHERE … IN(…) …”?
(edited by smiley.1438)
Look again at what i’ve quoted.
I don’t agree that passing duplicate identifiers is a bug. (in fact: it’s compensating bad programming on the client side)
I agree that the output is bugged.
However, it’s still too early to report/discuss v2 bugs. The v2 API is still in the works and not officially released yet.
(edited by smiley.1438)
Bugs in /v2
- duplicate identifiers in bulk requests are allowed
* /v2/quaggans?ids=404,404,404,404,…
I wouldn’t consider this as a bug, not even an error. For example imagine some SQL:
SELECT * FROM table WHERE id IN(404,404,404,404)
This is totally valid and would return exactly one line.
(edited by smiley.1438)
You are bored, aren’t you?
These are in fact the supply camps. I guess there’s no info on the wiki because the objectives.json is broken since forever and everyone here is using a “fixed” one which includes all info.
I’ve recently updated my gist and added a geojson, too.
The APIs are missing OAuth support.
Will be done before Half Life 3 comes out!
BTT: http://api.guildwars2.com/v1/guild_details.json?guild_id=4FB641DA-71BB-E311-8D3D-AC162DC0A8ED
{
error: 3019,
product: 1004,
module: 2,
line: 2646,
text: null
}
This guild id pops up frequently in current wvw matches.
Well, the blog was buried silently a while ago. You can try https://archive.org for dead links.
https://forum-en.gw2archive.eu/forum/community/api/ETA-World-Names-json-fix
https://forum-en.gw2archive.eu/forum/community/api/World-Names-404
https://forum-en.gw2archive.eu/forum/community/api/Looks-like-some-of-the-API-is-broken
Btw. to search within the API subforum try:
https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fforum-en.guildwars2.com%2Fforum%2Fcommunity%2Fapi
append your search term with a space in the search box.
(edited by smiley.1438)
The x,y,z coords are in meter so you have to convert it to inches knowing that 1 meter = 39.3700787 inches.
According to Cliff :
Some implementation notes:
The coordinate system used by mumble is slightly different than the game. GW2 uses inches (don’t ask), but mumble uses meters. So you’ll need to convert the coordinates back to inches for use with the map API.
Basically this.
http://leafletjs.com/reference.html#circle
Leaflet uses meter as units, so you just need to recalculate the radius given by the events API from inch to meter.
L.circle(map.unproject([cx, cy]), radiusInch/39.3700787).addTo(map);
I know it was discussed here, but i can’t find the right topic anymore because reasons.
Anyway, i think this might help: https://forum-en.gw2archive.eu/forum/community/api/Event-Details-API-location-coordinates/first#post3546948 (have a look at the whole tread)
Because “Trait Guide [Dogged March]”. It’s the trait unlock item which probably won’t fit into other categories because it’s actually a skill unlock. In fact, it would also fit into Consumable/Unlock – but who knows how it’s handled internally… For example, the Commander’s Compendium is Gizmo/Default.
Consumable/Unlock are so far only:
- bank tabs
- bag slots
- recipes
- dyes
- finishers (unknown)
(edited by smiley.1438)
Is there some more documentation somewhere then just “floor – The map floor” in the wiki?
No. But you’re welcome to add it: http://wiki.guildwars2.com/wiki/Guild_Wars_2_Wiki:Requests_for_API_editorship
It has been mentioned and discussed more than once that this forums word filter is not the best. (in fact, it’s plain stupid)
The creators of this piece of software should have their newspapers filtered with their own product.
Just use the wiki’s icons
https://github.com/codemasher/Guild-Wars-2-WikiMaps/blob/master/js/gw2wikimaps.js#L519
Either way, it’s already prepared then.
I wouldn’t consider this as easter egg:
Offering alternative data representations (such as XML) is planned, but not anytime soon.
soon™
No need to brute force anything – just have a look at the HTTP response headers
→ https://api.guildwars2.com/v2/
Pay attention to response headers which provide additional metadata about the underlying collection, pagination info, and links.
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Encoding: gzip
Content-Language: en
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-Content-Type-Options: nosniff
Link: </v2/quaggans?page=0>;rel=previous,</v2/quaggans?page=2>;rel=next,</v2/quaggans?page=1>;rel=self,</v2/quaggans?page=0>;rel=first,</v2/quaggans?page=5>;rel=last
X-Page-Total: 6
X-Page-Size: 5
X-Result-Total: 26
X-Result-Count: 5
Access-Control-Allow-Origin: *
Date: Tue, 15 Jul 2014 05:49:29 GMT
Content-Length: 133
(edited by smiley.1438)
Try this one in the meantime: https://gist.github.com/codemasher/b3b26a77dd0681697c59
Addons for GW2? O.o
Has it become Wildstar already?
Mixed content blocking usually happens when external content which is served via http is served through pages which are delivered via https (described in the Google article). All content by Anet is usually served via https – even the wikis do finally support https. The problem lies in youtube links which are automatically resolved and displayed as embedded video (i think thats currently the only external content allowed on the forums). Most users still browse youtube via http or copy/paste the share links which are usually http too. The forum doesn’t automatically convert these to https which would be a simple thing to change in the code – so it’s up to Anet to fix this or it’s up to the users to only use https links (the latter is impossible).
See also: https://developer.mozilla.org/en-US/docs/Security/MixedContent/How_to_fix_website_with_mixed_content
(edited by smiley.1438)
And sometimes anet is resetting the discovered status of all items, so that they have to be discovered again to show up in the api (that happened just once for now? cant find source anymore).
There you are: https://forum-en.gw2archive.eu/forum/community/api/API-errors-bugs/page/2#post3478842
OAuth2 soon™!
The above script was just a proof of concept which takes no URL parameters but it’d be the least problem to change that (would have been required for wiki usage).
Originally i wanted to create a static maps script as <noscript> fallback with .jpg output for the wikis but haven’t finished it because reasons. Instead of displaying the tiles in HTML you could simply create a new image of size (tiles_x * 256) x (tiles_y * 256) and put the tiles in there within the loop – it’s just a few lines extra.
you can have that simpler: https://gist.github.com/codemasher/75d8e1a24b2363cabebf (any part of a map)
Nothing prevents you from datamining as long as it isn’t reverse engineering of the actual game files aka gw2.dat which in fact would be against the EULA
Oh, ok – you might want to check this thread:
https://forum-en.gw2archive.eu/forum/community/api/Guide-to-the-Black-Lion-Trading-Co-API/
You should not get into trouble when using jQuery’s $.getJSON().
If you’re running a php based web server, you can handle it like so:
header("Access-Control-Allow-Origin: *");
see also: http://enable-cors.org/
“When it’s done.”™
Shhh, i think there’s something coming our way: https://api.guildwars2.com/v2
/me hides
The API fixes will go out with our upcoming 5/20 release. I wasn’t sure of the date until recently.
And that date is?
5/20?? Or: 20.05.2014.
Right here: https://forum-en.gw2archive.eu/forum/community/api/Looks-like-some-of-the-API-is-broken/3999815 – no ETA but fixes provided.
I built a quick array table for anyone using PHP.
https://github.com/codemasher/gw2api-tools/blob/master/json/gw2_worlds.json
$worlds = json_decode(file_get_contents('gw2_worlds.json'), true);
foreach($worlds as $w){
// do stuff...
}
Call me crazy, but I do believe some info about the next update, even if it’s just "hey, we’ll give you a potato in 4 weeks" would calm down the people impatience... such is the gw2 community hunger.
While we’d love to give you a time and date of when we’re sending out the potato, remember that during the development process we may discover that a baked potato would be even better. So instead of getting the potato of your dreams you end up with something completely unexpected.
It often happens that a mashed potato with gravy is even better still, unfortunately gravy requires more dev time. So we end up shipping a mashed potato without gravy to meet our promise of ship time or we push back the time and date of when we are shipping again and again. You get your mashed potato with gravy but it is delivered much later than it was expected.
Worst of all that is when we realize that potatoes are way too mainstream and that yams are where it’s at now. And I think we all know how reactions seem to go when we ship yams instead of potatoes.
So in a lot of cases the best we can do is tell you that we are still in the kitchen cooking things up, we’re reading your feedback, and that we’re excited to get the meal out to you soon™.
Sorry, but i can’t resist: https://twitter.com/CraigLuna/status/448299001410908161 *TOOT*
We have already an app like this: https://forum-en.gw2archive.eu/forum/community/api/Gw2-Location-Tracker/first#post2379754
Since the code is all open source it’s completely up to you how you use the data. The only problem might be the new Megaserver setup – i haven’t tested the app with that, so i don’t know how reliable the shard_id is.
When you say claim, do you mean when a guild physically goes to the supervisor to claim that area for their guild, or do you mean simply capturing a point?
The only way to track guilds via the API is when they actually claim an objective at the guild lord. So you can only track guilds which claim stuff.
That’s the kind of statistic a game developer never makes available, because they don’t want the public to have a clear, objective measurement of how many people are actually playing the game.
+1 for hidden irony.
I’ve also had some ideas to track WvW guild activity when i wrote the initial version of my WvW database https://github.com/codemasher/gw2-wvwstats . Theres actually a lot of funny things you can do with the currrent API – even track guild home world movings and stuff. The idea of my database was to keep detailed records for the current (and maybe most recent) matchups – not just points/income at a given time in the match but also objectives and guilds who owned the objective at this time – combined with the maps API etc. However, it’s currently suspended due to a lack of interest in GW2 and i can’t run it on my webspace because i’d need a huge database (~100MB data per week or so) which is impossible for me. So if someone has the resources and some ideas, feel free to fork!
This is something i’ve requested ages ago somewhere in the items API suggestion thread. This suggestion belongs there IMO, so request for merge
€: there it is:
https://forum-en.gw2archive.eu/forum/community/api/API-Suggestion-Items-Recipes-and-Crafting/3122804
(edited by smiley.1438)
The HoM site is still up and working but may appear broken for a lot of people. See also:
https://forum-en.gw2archive.eu/forum/support/forum/Hall-of-Monuments-1
ISH, YOU HAXOR!
(thanks for the info!)