Showing Posts For smiley.1438:

v2 item_details and recipe_details?

in API Development

Posted by: smiley.1438

smiley.1438

will there be a way to search for items

Given the current information i’d say “no”. I wish we had something for the maps/map_floor endpoints, though.

A few, most of /v2 is just exposing existing /v1 data in a cleaner & more useful way. We’ll keep adding new APIs as they make sense to it, but don’t expect seismic shifts in the data you can get out.

v2 item_details and recipe_details?

in API Development

Posted by: smiley.1438

smiley.1438

There are actually a lot of questionable items on the TP. Items that are either soul- or account bound or like the one you discovered, items which are not meant for player use. Seems like there are (or hopefully “were”) a couple of bugs in there so that one could list invalid items – most likely through “inofficial” TP API use.

v2 item_details and recipe_details?

in API Development

Posted by: smiley.1438

smiley.1438

Brilliant! Thank you!

v2 item_details and recipe_details?

in API Development

Posted by: smiley.1438

smiley.1438

Way more interesting would actually be the [item_type] part (hope you also changed the naming of that because it was a pain to “guess” the right identifier for that subobject).

Example:
https://api.guildwars2.com/v1/item_details.json?item_id=49412

Nope, sorry. That’s still passed-through as-is. Only difference is that we send back numbers as numbers instead of strings.

Oh, that isn’t too bad at all, though. Thanks for the info! However, any chance to get that subobject renamed in a more common way, something like “item_details” (or “itemDetails” in correct camelCase) or just “details”?

(edited by smiley.1438)

v2 item_details and recipe_details?

in API Development

Posted by: smiley.1438

smiley.1438

Way more interesting would actually be the [item_type] part (hope you also changed the naming of that because it was a pain to “guess” the right identifier for that subobject).

Example:
https://api.guildwars2.com/v1/item_details.json?item_id=49412

The Commerce APIs are now live!

in API Development

Posted by: smiley.1438

smiley.1438

And this is totally ok, here’s explained what this means: http://wiki.guildwars2.com/wiki/API:2

Order of ids returned, v2/commerce/listings

in API Development

Posted by: smiley.1438

smiley.1438

So why exactly should we go the extra mile in about every language? And where is the advantage to have the ID as actual value in an unordered array over having it as identifier of an associative array?

The API should not complicate stuff but be as convenient as possible. I highly doubt that not being able to directly access the results is convenient at all.

Order of ids returned, v2/commerce/listings

in API Development

Posted by: smiley.1438

smiley.1438

(we’re not only speaking about php which has some neat functions to sort this out, my example was just in php because lazy)

(also: (PHP 5 >= 5.5.0), so array_column() may not be available to everyone)

(edited by smiley.1438)

Order of ids returned, v2/commerce/listings

in API Development

Posted by: smiley.1438

smiley.1438

You got me wrong here. A little example to clarify:

$requested_items = [123, 456, 789];

$url = '.../v2/endpoint?'.http_build_query(['ids' => implode(',', $requested_items)]);

// -> request to $url, returns $result_items after json_decode()

foreach($requested_items as $id){
	// do stuff
	print_r($result_items[$id]);
}

This way it wouldn’t even matter when you requested the same id a couple times and got just one result for it (iirc someone complained about that the other day… (…))

Order of ids returned, v2/commerce/listings

in API Development

Posted by: smiley.1438

smiley.1438

Thats what i currently do. However, having an associative array (“dictionary” as you call it…) in first place would save looping over it twice. In fact, you wouldn’t even need to loop over the results at all, but over your list of requested IDs and just assign the result values.

The API should not complicate stuff but be as convenient as possible. I highly doubt that not being able to directly access the results is convenient at all.

(edited by smiley.1438)

Order of ids returned, v2/commerce/listings

in API Development

Posted by: smiley.1438

smiley.1438

Thats the reason why i’d prefer the results indexed by their id instead of having the id as actual value.

{
  "item_id": {
    "key1": "value1"
    ...
  },
  ...
}

Would actually save a lot hassle since you could directly access the objects and the order wouldn’t matter at all. (I’ve suggested that more than once…). Also, the identifier is passed as key to functions like JQuerys $.each() or prototype’s Enumerable.each() or could be as well used in foreach() loops in several C-like languages, so i wonder why this suboptimal response format was chosen.

Preferred Language

in API Development

Posted by: smiley.1438

smiley.1438

Preferred Language

in API Development

Posted by: smiley.1438

smiley.1438

So: i’d say you can’t without violating the EULA. Since GW2 doesn’t store the settings in the windows registry but most likely in the /appdata/roaming/Guild Wars 2/Local.dat. So you’d have to find the setting in there or might hook into the game to find out. (But i guess you know that anyway)

(edited by smiley.1438)

New APIs timing out

in API Development

Posted by: smiley.1438

smiley.1438

How are you downloading it? How much request/second are you making?

This would be in fact interesting to know.
For example, i’ve noticed a difference while using PHP’s fsockopen() vs. CURL.

Preferred Language

in API Development

Posted by: smiley.1438

smiley.1438

Why shouldn’t I detect the system language in order to provide a better user experience?

Why do “developers” always think that a “better user experience” is to withdraw control from the user? Just give them a choice.

(zh is a valid language code for v2, but not v1.)

Ok, i’ve confused the country code with the language code. However, you know the valid values and you can check them any time.

Preferred Language

in API Development

Posted by: smiley.1438

smiley.1438

Of course there is a way to determine the language of the content. You know that the v1 API i will return data in exactly 4 languages: “en”, “de”, “es” and “fr” while “en” is default. So any other values than these 4 will most likely return english. Always.
That a systems language might not be supported is not a problem of the API and you shouldn’t even consider do detect it to determine it to set the API-language.

(zh isn’t even a valid language code, so this might cause the error – it would be cn-zh)

(edited by smiley.1438)

Preferred Language

in API Development

Posted by: smiley.1438

smiley.1438

Seriously, the Content-Language header doesn’t make any sense at all. The default language is always english as you already noticed and will only change if requested.

So if you request ?lang=de, the content language won’t be “cn”. Also, i highly doubt that anyone would do any changes to the v1 API now that it has basically reached end-of-life.

Order of ids returned, v2/commerce/listings

in API Development

Posted by: smiley.1438

smiley.1438

Signs of hope

in API Development

Posted by: smiley.1438

smiley.1438

Well, the current guild API just returns guild names and logos, which would be enough for this purpose, though.
It’s currently a pain to call the API x times to get the guild names for a WvW match – bulk requests for guild IDs would be greatly appreciated!

Signs of hope

in API Development

Posted by: smiley.1438

smiley.1438

Hey Pat,

thanks for the sign of life!

I noticed there’s no guild endpoint listed over here: https://api.guildwars2.com/v2/
Is there a specific reason for it? I hoped that this one would be available including bulk requests, which would help speed up my upcoming Overwolf app.

(edited by smiley.1438)

Search feature not working

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

“There is no spoon.”

Top traded items

in API Development

Posted by: smiley.1438

smiley.1438

Well, now since bulk requests are available, you could just flavour your item database with the top buy/sell prices and run a cronjob to get the most recent data for these in chunks of 200 items per request.
Then for example just do a SELECT * FROM items_table WHERE … ORDER BY top_sell DESC.

The Commerce APIs are now live!

in API Development

Posted by: smiley.1438

smiley.1438

I case these APIs work like the previous ones, these are most likely live values.

Why does the forum let me enter more than 45

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

“Why does the forum let me enter more than 45”

In fact, it does not…

Even more annoying because the post-headline will be cut down anyway thanks to

text-overflow: ellipsis;

https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow

The Commerce APIs are now live!

in API Development

Posted by: smiley.1438

smiley.1438

Also, would someone tell me where I can get a list of which Item IDs correlate to which Items? I just want to quickly look up an Item and see it’s Item ID in order to plug that information into my spreadsheet when it becomes available for use.

Try this one: http://gw2wbot.darthmaim.de/smiley/

ETA World_Names.json fix?

in API Development

Posted by: smiley.1438

smiley.1438

But how would you directly access some identifiers value?

I do it like that for example:

Objectives[id].name[lang]

ETA World_Names.json fix?

in API Development

Posted by: smiley.1438

smiley.1438

There’s a couple of reasons why i changed the format of the json, some of them mentioned over here (and following): https://forum-en.gw2archive.eu/forum/community/api/API-Suggestion-World-vs-World/2455807

Missing 'X-Result-Total' response header

in API Development

Posted by: smiley.1438

smiley.1438

Newbie question about items.

in API Development

Posted by: smiley.1438

smiley.1438

Hmm, ok, maybe Darthmaim took it down for whatever reason. I’ll make a dump of the current one and upload it to my webserver to save you the hassle of polling the API 4*~36000 times. Just gimme a little time.

€:
for some reason the export was interrupted at ~6.5k items <.<
I’ll tell Darthmaim to re-upload the DB to the above URL^^

€€:

He told me, that he’ll be home in 4-5h and upload it then. https://twitter.com/darth_maim/status/509313054115659776

(edited by smiley.1438)

Newbie question about items.

in API Development

Posted by: smiley.1438

smiley.1438

Send a gazillion requests to the servers.

You can also download our database over here: http://de.gw2treasures.de/gw2treasures.sql.gz which is the backend of http://gw2treasures.de/

The backend of the backend is a slightly older version of my database repo over here: https://github.com/codemasher/gw2-database (haven’t done much commits recently because i’m waiting for the API v2. However, i’ll then try to keep the database itself as close as possible to the recent version)

(edited by smiley.1438)

GW2 WvW App Contest - We're here for you

in API Development

Posted by: smiley.1438

smiley.1438

Aaaaand another question:

As my app is going to be a Guild Wars 2 specific, I’d also like to theme it that way. Do we have permission to use game graphics for our overlay apps?

I think thats one of the purposes of the asset kit: https://www.guildwars2.com/en/media/asset-kit/

Why does the matches API break on reset?

in API Development

Posted by: smiley.1438

smiley.1438

https://api.guildwars2.com/v1/wvw/matches.json

{
wvw_matches: [ ]
}

ALWAYS.

EU matches are already running, so it should at least deliver these.

I hope this is being adressed for API v2…

2 Hopefully quick adds/fixes

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

#1: https://forum-en.gw2archive.eu/forum/support/forum/Search-feature-not-working

#2: You can at least display the time of the last message with something like greasemonkey/tampermonkey:

div.topic > span.title > a.topic

holds a dataset value

data-last-message="2014-09-05T18:37:05Z"

see also: https://gist.github.com/codemasher/f8a367b2d202afcc201e#file-ws-forumtweak-js

(edited by smiley.1438)

GW2's Mumble Link "context" data format

in API Development

Posted by: smiley.1438

smiley.1438

The world_id seems to be broken in WvW as well.

Right. I forgot that the world_id was always broken in WvW, so this value is basically useless now in all cases.

Aww that sucks, hope they fix it so I can find the world automatically from my Overwolf app.

soon™

GW2's Mumble Link "context" data format

in API Development

Posted by: smiley.1438

smiley.1438

The world_id seems to be broken in WvW as well.

Right. I forgot that the world_id was always broken in WvW, so this value is basically useless now in all cases.

[API Suggestion] World vs World

in API Development

Posted by: smiley.1438

smiley.1438

@Devs:

Can you please add the WvW objective icons to the files API (not just the ruins)?

GW2's Mumble Link "context" data format

in API Development

Posted by: smiley.1438

smiley.1438

@Devs:

Will there be an update to the context data to reflect the changes of the commander icon colors? (like commander: 0 = off, 1 = blue, 2= red, …)
Also: can you please fix and/or explain the “garbage” values which are currently returned as world_id?

Overwolf GW2 app contest

in API Development

Posted by: smiley.1438

smiley.1438

Does anyone know whether the Overwolf API does even handle the Mumble Data Link?

Not yet. Join me here: http://feedback.overwolf.com/forums/235154-feature-requests/suggestions/5262764-mumble-integration

In the meantime you can use our location sender or just code your own.

Safespots and Exploits

in Fractals, Dungeons & Raids

Posted by: smiley.1438

smiley.1438

Avoiding mechanics by standing in a singular area isn’t an exploit, it’s possible bad dungeon design (for example the cage room in the newer flame and frost fractal…sorry I can’t remember the name of the dungeon it’s late). In that fight there are areas in which you can avoid almost the entire fight mechanic, that’s an example of poor dungeon mechanic design.

Standing on a rock/ledge/platform while the boss attempts to hit you from below (yes there are some bosses that still have abilities that hit you), is a problem with pathing and the boss not resetting when it can’t reach the target. This is exploiting a bug.

Kiting and using geometry (running AROUND pillars and such) is a perfectly valid tactic.

Standing outside a stationary boss’s range is not an exploit, the boss “should” reset after an extended period of time, but is not. This is an example of poor boss implementation, and not an exploit.

Using terrain to block/dodge boss mechanics is also considered a valid tactic (standing behind a pillar when a boss charges).

At this point we are getting very nitpicky at each individual boss and each mechanic in question. I’m sure most of you are aware of what is an exploit and what is a mechanic/tactic. We are working on fixing these “Safe Spots”, but it’s going to take some time to get it done, and will probably happen over time. (Sorry I am not going to go into particulars for fights/changes)

I’ll be very clear here:
If a GM finds a player that is using a “Safe Spot”, that player will be moved out of the safe spot and warned (via in-game text). If they are caught again, that account will be temporarily suspended.

If a GM finds a player that is using a “Safe Spot” and selling the dungeon run, that account will be temporarily suspended without warning.

So you’re basically telling us that abusing the bad design (environment, clipping, boss mechanics) is an exploit and we can get punished for that? I wouldn’t even consider wall jumping in WvW an exploit although it’s annoying – it’s just abusing the bad clipping there. If it was abusing a serious bug (like e.g. the duping bugs in GW1) OK, i could understand punishment in that case. Speaking of GW1: abusing the environment and AI was a perfectly valid technique there all the time.

I find it even funnier that you waste resources on “moving players out of safe spots” instead of actually FIXING THE BUGS/CLIPPING/MECHANICS (i know that GMs don’t fix these, don’t argue on this.) – all of these are pretty well known for nearly 2 years now.

You can’t just come up and SAY that some things aren’t OK to do. The game itself has to enforce this and make sure it won’t be played in unintended ways.

(edited by smiley.1438)

Overwolf GW2 app contest

in API Development

Posted by: smiley.1438

smiley.1438

[snip]

I would love to make something like this for WvW so we can see where the different guilds are operating. Would this be ‘legal’ to make? Just positions for our allies.

Yes. I discussed this scenario with the WvW team, and they’re totally OK with this usage of our APIs.

Their only requirement is that player positions should not be posted publicly, since obviously it would then be used by opposing teams.

In conclusion: anything which doesn’t violate the API terms of use (e.g. 3rd party apps which hook into the game directly) is OK.

No character context API?

in API Development

Posted by: smiley.1438

smiley.1438

You will (still) need a 3rd party app to get the location data from GW2 and a server to collect and process the data – have a look at our location tracker.

I still hope we get this in near future via Overwolf, see also:

http://overwolf.uservoice.com/forums/235154-feature-requests/suggestions/5262764-mumble-integration

No character context API?

in API Development

Posted by: smiley.1438

smiley.1438

GW2's Mumble Link "context" data format

in API Development

Posted by: smiley.1438

smiley.1438

The world_id is (or should be) your home world id which can (could) be assigned to https://api.guildwars2.com/v1/world_names.json . However since the megaservers were introduced it’s basically messed up and will only return usable values in case you’re in WvW.

The team_color_id value isn’t 0/1/2 but 0 for neutral and the actual color_id from https://api.guildwars2.com/v1/colors.json for red/blue/green.

(edited by smiley.1438)

Events tracker

in API Development

Posted by: smiley.1438

smiley.1438

Well, the events API is pretty kittened up since the megaservers were introduced. However, it seems to be possible to still track the events as described over here: https://forum-en.gw2archive.eu/forum/community/api/Megaserver-Event-Start-Times-and-End-Times/

(note: i have never messed around with the events API since dragon timers popped up everywhere back then…)

API errors & bugs

in API Development

Posted by: smiley.1438

smiley.1438

You are asking 40 times for the SAME egg which remains 1. I’m out.

API errors & bugs

in API Development

Posted by: smiley.1438

smiley.1438

In which universe do you only have to check preconditions on the client side but not on the server side?

In one where redundant data is uncool.

API errors & bugs

in API Development

Posted by: smiley.1438

smiley.1438

(in fact: it’s compensating bad programming on the client side)

API errors & bugs

in API Development

Posted by: smiley.1438

smiley.1438

Ok, programming 101:

You have a list of numbers which you want to send to an API and get the corresponding data for each of them. The API accepts duplicates of the numbers for convinience but returns just one result for each unique. Now back in your program you loop through your list of numbers and assign the data you recieved to each of them. This is possible. In (nearly) any language. Profit.

API errors & bugs

in API Development

Posted by: smiley.1438

smiley.1438

Do you really have no clue why that might be important?

It isn’t. You make it up.

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

Dude, why are you so mean? My analogy is not about comparing data to physical objects. It is about comparing public services to public services.

Even comparing apples to tomatoes would make more sense.


HTTP Error 400 Bad request
{
    "text" : "You asked for 40x the same string of text. You *can* get it once instead if you simplify your request."
}

Forcing me to try again instead of giving me something I’m not asking.

Why would you force someone to change the request even if you could deliver what has been requested?

Anyway, off-topic, request for split into a new topic if there’s still reason to discuss.

(edited by smiley.1438)