Showing Posts For Rawrfaec.6412:

[API Suggestion] Event Details

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

The data format for these events are more suited to be a dictionary than an array, and there should be no downsides to having them presented in this format. In javascript there are definitely no downsides.

It is a considerable inconvenience for static languages. With the current approach, in JavaScript, and probably any dynamic language that can map as easily to JSON, everything works immediately and that’s great for JS applications. However, as a rule, static languages have a much easier time processing an array allowing you to explicitly look up the values of the keys you expect to be there. The reasoning that this data is great for maps/dictionaries is completely sound, it’s just that building that dictionary is a lot more work right now if you’re not using JS and literally no work at all if you are. In contrast the alternative would require the same, small amount of work for all languages, including JS, which, of course, is a minor inconvenience for such applications.

I would definitely change this back for an eventual v2 since building your own dictionary from an array is guaranteed trivial in any language with dictionary support, despite the consequence of a needless (but completely negligible) overhead for JS.

Basic API calls with JQuery

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

Indeed, the code needs to be optimalised some more (as you mention, use the JQuery functionality a bit more).

Actually, using more jQuery will increase overhead. It takes quite a bit for that to be noticeable and the consistency can be worth more in the long run from a perspective of maintenance but raw JavaScript always outperforms jQuery. You certainly wouldn’t notice the difference in this case, however.

PHP 5.3+ API Wrapper (examples)

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

If you’re on Windows the fastest way to get started is almost surely with The Uniform Server, which doesn’t even require installation.

API implementation library "master list"

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

GW2++

What about moving this list to the Wiki? Putting the onus on one user to keep the list sorted is a big responsibility and it is largely useless in its current form. The Wiki eliminates that problem, and since the API is documented there anyway I’d expect to also find relevant tools for working with it.

(edited by Rawrfaec.6412)

[API Suggestion] Node Locations

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

Also you would make farming easy again for bots.

It wouldn’t affect bots (they teleport anyway) but on the other accounts you’re right. I essentially expect ArenaNet to not release enough information to construct a real-time map in a third-party application and will be disappointed if they do.

[API Suggestion] Colors

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

C++. Working around it is easy enough, not having to is just easier. This will require special handling of node names as they now contain information.

Is this API allowed?

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

Can we hope, as we ask for it since many years, since TexMod, an “Validated App List” or something like that ?

Almost certainly not. The very moment ArenaNet whitelists a third party tool ArenaNet assumes responsibility for anything that tool does. They’ll never want to do that (and they’d be fools to). Somebody could have a tool whitelisted and only then make it dangerous.

[API Suggestion] Colors

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

I think having this return an array of colours, with an explicit ID property, thus mimicking the events API, would make more sense. It’s currently useful as a map but we don’t have easy access to the keys. It’s easier to construct a map from an array on the client side than extracting all the IDs as keys.

Is this API allowed?

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

Makes sense to me as it seems to be basically the same idea as say the Steam overlay, which I currently use for Guild Wars 2.

It is not like the Steam overlay. The Steam overlay (as well as Origin’s, and others’) is injected into the program at run-time. For third party tools this is actually what you could get in trouble for but if there were a risk of that you’d already know it.

Does your Overlay get in which zone you are at the current time?

It doesn’t. It doesn’t know anything about you. It only knows the state of (certain) events and it displays that regardless of what you’d like.

I got a Trojan

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

The point I was trying to make is that people will download binaries simply because they don’t know any better. If you’re not making software that “works” you’re not making useful software, and to the average user source code doesn’t “work” — binaries do. It wasn’t an accusation. You’re right about signing, of course, but I’m not sure that’s an option in cases like these.

Is this API allowed?

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

The overlay is basically a very tiny, non-obtrusive Web browser with no more (and far less) functionality than a normal Web browser. It’s harmless.

I got a Trojan

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

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.

Then an average user shouldn’t be downloading EXE binaries from an untrusted source in the first place. If the user still chooses to take the risk then that becomes his responsibility.

You can no more expect users to not download binaries than read, not to mention understand, source code, but releasing source code is the closest anyone can come to vouching for their software. If you don’t have the technical knowledge to compile code on your own you’re stuck with having to trust pre-compiled binaries.

The responsibility here is with virus checkers not automatically blacklisting executables like these. I note that MSE does not complain about the file in question.

[API Suggestion] Events

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

There are certainly cases where having guaranteed sorted data wins you something without costing you anything for not having sorted data. But I did say it was a luxury problem.

Mapping the API

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

I had chosen not to do that in my version because, unless I’m unaware of something, there’s not really any reason to convert them, is there?

Not really, no. Especially if you want a uniform interface. However, knowing they’re integers behind the scenes can be valuable contextual knowledge (you could choose to convert them if you wanted to, and it will be well-defined).

It becomes important because there are discrepancies between the APIs and although we’re expecting an item ID to a number it would be factually incorrect to say that they are for for instance the item detail API. A statically typed language would throw a fit.

(edited by Rawrfaec.6412)

[API Suggestion] Events

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

A luxury problem but would it be possible to have events sorted by ID? It’s a lot of client overhead that seems like it could be avoided. I realize they probably aren’t indexed by public IDs and requiring an ORDER BY on every request would add unnecessary server overhead, which is even worse.

Are we allowed to use it?

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

It uses the API so yes.

[API Suggestion] Items, Recipes, and Crafting

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

By extension a link to an item icon is unnecessary as long as we get a resource from which we can fetch an icon corresponding to the item’s ID, which is already given. Having a way to get both icon and chat code would be nice but neither has to be in JSON format.

[API Suggestion] Trading Post API

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

The question you should ask yourself is, do you want legit apps to have those capabilities or not?

Not. I have no desire to see ArenaNet officially support out-of-game (two-way) trading post transactions, regardless of past intentions. In my not the least bit humble opinion, the cost of being able to use the trading post is having to play the game for which the trading post was made. This shouldn’t be a place to do hobby stocks trading.

I’m generally a vocal advocate of convenience and ease of use but here I think it would be a mistake. Of course, I regret the in-game trading post interface is as awful as it is, but so it goes. An obvious step for the community would be to make something decent in place of that.

I would prefer the “fear of bots” to be taken out of this api discussion, as it is out-of-topic for this thread, and move on to discussing user scenarios and how we can make useful TP apps for legit users.

You’re the one that keeps going back to it. Bots in particular aren’t relevant but the question of how much power we should have over the trading post with an API very much is.

[API Suggestion] Trading Post API

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

This only serves as an added inconvenience to your users…

That inconvenience is crucial for balance purposes. If you allow for buying and selling via an API you open up for AI trading and you don’t want to go there. The irritation of being stuck in your office and not being able to act on a notification is the price you pay for being able to get notifications at all, which, officially, you can’t right now.

[API Suggestion] Trading Post API

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

I’m sceptical about being able to buy and sell stuff from outside the game. My view is, if you plan to game the trading post (which is fine!) you have to also be playing the game. If you can only buy or sell you won’t be able to abuse the potential for optimization you have in third party applications to generate gold faster than your competitors. However, then we’ll have people complaining that you can’t do both so it may be better to restrict a TP API to observation.

Interacting with the gem store is unaffected by the above, obviously.

[API Suggestion] Characters

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

Player agency is nice in principle but it requires a lot of extra work and relying on people to maintain such settings is a fool’s errand. If people have to actively allow access to information we’ll end up not being able to know anything about anyone. If people have to actively deny access we’ll end up being able to know everything about everyone.

I don’t think hiding account names is sensible as account names aren’t (and shouldn’t be) inherently secret. It’s trivial to get the account name of a character anyway. If account names should be restricted just make it authorized information, which is fair if inconvenient.

I don’t like having character location reported. Partly I expect that to be a huge drain on resources, partly it has huge privacy implications. I appreciate that it can be useful for, say, guilds, to get around the five-man party size limit, but people have been making that work up until now and I don’t see that changing.

The ability to view character and bank inventories would be very much welcome. Inventory management is probably too much to hope for but not having to swap characters to move stuff between them would be nothing short of amazing.

GW2.NET a .NET wrapper around the GW2 API

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

I don’t know the reason in this case but .NET SDK JSON serializers are relatively slow compared to third party alternatives.

WvW objective names

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

Here is a JS version of smiley’s DB, still missing Spanish translations. Some values (namely map names) are changed to be more in line with the official API.

How Often I can Access the api

in API Development

Posted by: Rawrfaec.6412

Rawrfaec.6412

There is no rate limit (yet) and the event API is real-time. That said, every millisecond is pretty crazy.