Showing Posts For smiley.1438:

API errors & bugs

in API Development

Posted by: smiley.1438

smiley.1438

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.

I didn’t mean it like that. We’re starting to mix up different ideas.

How it is right now

  • I ask for 40 yellow easter eggs
  • I receive 40 yellow easter eggs
  • The receipt says that 35 eggs are in stock
  • The receipt says that I received 40 of 35 eggs

How you say it should be

  • I ask for 40 yellow easter eggs
  • I receive 1 yellow easter egg
  • The receipt says that 35 eggs are in stock
  • The receipt says I received 1 of 35 eggs

How it should be

  • I ask for 40 yellow eggs
  • The cashier explains to me that there is only 1 yellow egg

Seriously? You compare data to physical eggs? You should better work in a supermarket when you think that way.

You asked for 40x the same string of text. You get it once instead because i don’t want to write it down 40 times as it would be a waste of my resources, but you are free to copy it as many times you want.

(edited by smiley.1438)

API errors & bugs

in API Development

Posted by: smiley.1438

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)

API errors & bugs

in API Development

Posted by: smiley.1438

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)

API errors & bugs

in API Development

Posted by: smiley.1438

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)

API errors & bugs

in API Development

Posted by: smiley.1438

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.

API errors & bugs

in API Development

Posted by: smiley.1438

smiley.1438

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)

API errors & bugs

in API Development

Posted by: smiley.1438

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)

API errors & bugs

in API Development

Posted by: smiley.1438

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)

Quaggans

in API Development

Posted by: smiley.1438

smiley.1438

You are bored, aren’t you?

objective_names.json

in API Development

Posted by: smiley.1438

smiley.1438

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.

https://gist.github.com/codemasher/bac2b4f87e7af128087e

API errors & bugs

in API Development

Posted by: smiley.1438

smiley.1438

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.

Episode 2 Dry Top Not in Tile Service

in API Development

Posted by: smiley.1438

smiley.1438

404 error (arena.net)

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

Please Make The Forums Truely Searchable

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

world_names.json disabled?

in API Development

Posted by: smiley.1438

smiley.1438

(edited by smiley.1438)

Converting Event Radius

in API Development

Posted by: smiley.1438

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);

Converting Event Radius

in API Development

Posted by: smiley.1438

smiley.1438

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)

Undocumented Changes

in API Development

Posted by: smiley.1438

smiley.1438

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)

Open world map infos

in API Development

Posted by: smiley.1438

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

Forum word changing bug...

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

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.

Files API Missing Vista & Skillpoints ?

in API Development

Posted by: smiley.1438

smiley.1438

Quaggans

in API Development

Posted by: smiley.1438

smiley.1438

Either way, it’s already prepared then.

Quaggans

in API Development

Posted by: smiley.1438

smiley.1438

I wouldn’t consider this as easter egg:

Offering alternative data representations (such as XML) is planned, but not anytime soon.

Is the API forum dead?

in API Development

Posted by: smiley.1438

smiley.1438

soon™

Quaggans

in API Development

Posted by: smiley.1438

smiley.1438

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)

ETA World_Names.json fix?

in API Development

Posted by: smiley.1438

smiley.1438

a new “addon”

in API Development

Posted by: smiley.1438

smiley.1438

Addons for GW2? O.o
Has it become Wildstar already?

insecure page content

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

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)

[items] and how it works

in API Development

Posted by: smiley.1438

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

GuildWars2 SSO login (CAS Protocol)

in API Development

Posted by: smiley.1438

smiley.1438

OAuth2 soon™!

WvW, EotM - Full Res Map

in API Development

Posted by: smiley.1438

smiley.1438

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).

WvW, EotM - Full Res Map

in API Development

Posted by: smiley.1438

smiley.1438

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.

WvW, EotM - Full Res Map

in API Development

Posted by: smiley.1438

smiley.1438

[API Suggestion] Maps API

in API Development

Posted by: smiley.1438

smiley.1438

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

How to login to TP using JS

in API Development

Posted by: smiley.1438

smiley.1438

How to login to TP using JS

in API Development

Posted by: smiley.1438

smiley.1438

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/

API 2.0?

in API Development

Posted by: smiley.1438

smiley.1438

“When it’s done.”™

API 2.0?

in API Development

Posted by: smiley.1438

smiley.1438

Shhh, i think there’s something coming our way: https://api.guildwars2.com/v2

/me hides

World Names 404

in API Development

Posted by: smiley.1438

smiley.1438

Looks like some of the API is broken...

in API Development

Posted by: smiley.1438

smiley.1438

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.

API errors & bugs

in API Development

Posted by: smiley.1438

smiley.1438

Looks like some of the API is broken...

in API Development

Posted by: smiley.1438

smiley.1438

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...
}

Transparency!? It was here - now its gone!

in PvP

Posted by: smiley.1438

smiley.1438

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*

Mumble Link for node tracking, etc.

in API Development

Posted by: smiley.1438

smiley.1438

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.

WvW guild leaderboard

in API Development

Posted by: smiley.1438

smiley.1438

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.

Playercount

in API Development

Posted by: smiley.1438

smiley.1438

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.

WvW guild leaderboard

in API Development

Posted by: smiley.1438

smiley.1438

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!

[API Suggestion] Update

in API Development

Posted by: smiley.1438

smiley.1438

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)

HoM calculator site not working anymore

in Forum and Website Bugs

Posted by: smiley.1438

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

skins.json and skin_details.json!

in API Development

Posted by: smiley.1438

smiley.1438

ISH, YOU HAXOR!

(thanks for the info!)