Showing Posts For poke.3712:

API CDI 2015

in API Development

Posted by: poke.3712

poke.3712

However the question is where to source the information.

You are welcome to put this on the official wiki (which also serves as the place for the API documentation), so application developers can get the data they need in a parsable format.

@poke // GW2W //

API CDI 2015

in API Development

Posted by: poke.3712

poke.3712

There’s not really much use for that. You can just encode that statically within your application and safe heavy HTTP requests that way. As you said yourself, that data is very constant.

If you want, I can write down that data for you.

@poke // GW2W //

API CDI 2015

in API Development

Posted by: poke.3712

poke.3712

Also I’m hoping for a Single Sign On solution for authentication … because account theft is a bad thing.

For the authenticated API, OAuth2 will be used. So you will have the standard login on account.guildwars2.com, just like with the forums, to authorize applications to use your data. You could even use this as a sign-on functionality for applications that don’t use the API at all.

@poke // GW2W //

/v2/recipes & /v2/recipes/search enabled

in API Development

Posted by: poke.3712

poke.3712

Documentation on the wiki: recipes, recipes/search

@poke // GW2W //

/v2/worlds enabled

in API Development

Posted by: poke.3712

poke.3712

@poke // GW2W //

Repeatable historical achievements gone

in Bugs: Game, Forum, Website

Posted by: poke.3712

poke.3712

They didn’t. The other ones I asked (as I mentioned) did have them in their original category.

@poke // GW2W //

Repeatable historical achievements gone

in Bugs: Game, Forum, Website

Posted by: poke.3712

poke.3712

It seems that repeatable achievements in the historical section don’t always show up.

For example I’m absolutely sure that I completed Winter Wonderland Mastery and even maxxed the AP you can get from it. Yet, it doesn’t appear in my “A Very Merry Wintersday” achievement list. The same applies to last year’s “Lunatic Inquisition Regular” which I did max out too, if I remember correctly.

Others told me, that their achievements show up when they didn’t complete the current run completely. For example “Winter Wonderland Mastery” requires 20 completions, and can be repeated. They repeated the achievement multiple times to get the maximum number of AP out of it, but continued to e.g. 7/20 completions, making the achievement stay.

Obviously, even achievements that did end at 0/20 should appear if APs have been rewarded for it. When they are repeatable, a single completion should trigger them being displayed in the historical category.

@poke // GW2W //

Providing an api for types and flags

in API Development

Posted by: poke.3712

poke.3712

Providing an API that contains all of those types/flags that are currently in use would be much more helpful for people compared to a static, potentially outdated list.

While I agree that an outdated list is not a good thing, I disagree that there should be an API for it. Flags are usually something that is hardcoded into the logic at some point. So the set of flags is very limited, and static. And there’s no need to provide a “static documentation API”. Things like this should be in the API documentation.

An API that would provide this kind of info would in the same way require to be updated manually whenever a new flag is introduced and that has the same problems as a documentation: People forget to update it, so the resource becomes outdated. But unlike a custom API, the documentation is very easy to fix, especially by others (e.g. us, when we notice an item with a new flag).

PS: Added the v2/items documentation to the main page of the docu since you seem to have forgotten to do that initially and it bugged me. :p

Yeah, I forgot to do that. Then later remembered to do it again but forgot it again xD Thanks! ^^

@poke // GW2W //

Item details class design

in API Development

Posted by: poke.3712

poke.3712

Statically typed languages like C# do not allow “item.details” objects to take on different types according to the value of “item.type”.

While that is true, you could still have some abstract `ItemDetails` type that has various different implementations depending on the item type. Or even better, have a base `Item` type and make a subtype for each item type that extends the type by those additional properties in the `details` object. That way, you would also get a proper type in C# (and wouldn’t need to check the item’s `type` value).

Depending on how you are parsing the JSON, you might be able to put this into a custom parser that creates the proper subtype depending on the `type` value.

Does anyone use JSON schema validation?

JSON schema validation was invented by XML people who thought they would need to add whatever XML had as JSON replaced XML in web services. But JSON was meant as a dynamic format, so having a schema doesn’t really make sense to me…

It would be interesting to see a tool that loops through all 38k items, then outputs a complete schema that describes all possible objects and properties.

I looked at all items, and ended up with the documentation. Hope it helps

@poke // GW2W //

Providing an api for types and flags

in API Development

Posted by: poke.3712

poke.3712

[…]provide all the types (for example weight_class, damage_type, unlock_type etc.) and flags ( for example AccountBound or Offensive) that are currently in use within the official apis.
[…]
I figured this might be useful for you guys aswell, since i noticed that the documentation for those values was rather lackluster, so this would make things alot easier since it is bound to keep things up to date.

It’s not an API, but the documentation on v2/items lists all the possible types and flags along with a short description for what it is used for. The lists there consider all items currently available via the API, so for now it’s pretty complete

@poke // GW2W //

v2 item_details and recipe_details?

in API Development

Posted by: poke.3712

poke.3712

36 minutes on my connection for a full update

I’m down to 2 minutes for a single language now… ;D

@poke // GW2W //

/v2/items Enabled

in API Development

Posted by: poke.3712

poke.3712

The full documentation is now available, including all edge cases and oddities currently in the API.

The only way to do this (at least as far as I know) is to ask the server about every single item like this: http://jsfiddle.net/1zkftj7y/1/

For a quick search, you should probably cache the item names on your end for now. Requesting all items for every single search seems like a very bad idea. If you want some data to start with, here are all item names in the API at this moment.

Also, it’s a very bad idea to fetch every single item at once. If you need multiple resources, fetch for multiple at once using the `ids` parameter. That reduces the requests you need to do by a lot and results in a much better performance (for both your client as well as the API server—HTTP requests are expensive!).

And if you don’t actually know which item ids you are looking for, instead of fetching all ids and then querying the information for all those ids, just use paging on the resource directly.

@poke // GW2W //

/v2/items Enabled

in API Development

Posted by: poke.3712

poke.3712

Documentation is now available on the wiki. For now, I’ll refer you to the v1 documentation for the type-specific properties. I’ll update that as soon as I verified whether the format changed for anything in v2.

@poke // GW2W //

Order of ids returned, v2/commerce/listings

in API Development

Posted by: poke.3712

poke.3712

Yup, we make a bunch of async requests for the data and simply assemble it in the order it returns.

Is that order consistent enough for paging though? I.e. when using the paging mechanism, can I be sure that I get every object at some point, or is it possible that some will be missed because the order for one page ended up being different than the other?

@poke // GW2W //

The Commerce APIs are now live!

in API Development

Posted by: poke.3712

poke.3712

Documentation of v2 is available here: http://wiki.guildwars2.com/wiki/API:2

Why do you publish an API without basic documentation?

Because I wasn’t warned early enough.

@poke // GW2W //

Signs of hope

in API Development

Posted by: poke.3712

poke.3712

After a few comments, Evan states “I feel like not enough people fully use all of our apis that are available to the public and we should really call them out so that people can really start utilizing them to the fullest abilities.”

Unfortunately, the API does not really give us that many more options than we are already using. One of the biggest opportunities for tools was the event API, but with the mega servers it became pretty useless.

At the 32 min area, Josh answers the question “Will the new TP change the APIs and break sites that currently use the api?”

Josh answers, “Yes.” before the question is read, but after the question is read, he states “We are currently reaching out to some of them right now, but yes… I don’t want to talk about it.”

Sorry to disappoint you here, but they were not talking about the public API but the internal API the trading post internally uses. Sites like gw2spidy and gw2tp have been using that before to access trading post information. That API will change, breaking those pages (and likely any other site that uses those undocumented internal APIs).

As for API v2, as far as I am aware, it will only allow us to get sell/buy listings and gem exchange rates. So for sites like those mentioned above, they should be able to switch to the official API that way and still get all the content (albeit with a faster and easier interface).

Apart from that, v2 is mostly a interface update, no new features are added (except for the quaggan API); at least that’s what I know.

@poke // GW2W //

Is WvW weapon specialist in game yet?

in WvW

Posted by: poke.3712

poke.3712

Wiki says it will be implemented july 1st.
But hey, at least we got our greens :/

That was just some random user adding some speculation. As far as I am aware, the NPCs aren’t in the game yet. I assume that ANet will give some details in their live stream in ~17 minutes.

@poke // GW2W //

skins.json and skin_details.json!

in API Development

Posted by: poke.3712

poke.3712

I’ll get some documentation up on the API wiki today (unless someone beats me to it).

Since you didn’t get to doing it that day, I “beat” you to it now… ^^

@poke // GW2W //

(edited by poke.3712)

Advertising in applications

in API Development

Posted by: poke.3712

poke.3712

As per the API Terms of Use:

“[…] you may use the APIs to make commercial products so long as they are otherwise compliant and do not compete with ArenaNet.”

So I’d say, yes, you may show advertisements in your app.

@poke // GW2W //

Authenticator problem with website

in Forum and Website Bugs

Posted by: poke.3712

poke.3712

@poke // GW2W //

Monospace font for code

in Forum and Website Bugs

Posted by: poke.3712

poke.3712

I don’t really want to bump threads, but could this get a bit attention? It’s not hard to solve but would make our life so much easier

@poke // GW2W //

API errors & bugs

in API Development

Posted by: poke.3712

poke.3712

Exactly, \u00ae would be an escape sequence that is used within string sequences where either unicode characters are not acceptable (some language have such a restriction) or where you simply cannot type the character. The string will however actually contain a 0x00AE character at that point (depending on the language); and not the escape sequence.

As Ish already explained, &something; are SGML or XML entities—most notably known from HTML—that are used to again escape a character sequence where typing the character itself would be hard or where the document encoding cannot encode the character in question (while the target encoding does support it). In times of utf-8 being the standard encoding, this is usually not necessary though, so the only commonly used entities are &quot; for ", &lt; for < and &gt; for > which all encode special characters that are part of the syntax.

@poke // GW2W //

Waypoint Codes

in API Development

Posted by: poke.3712

poke.3712

but it’s far from automated and takes a long time.

The format of chat links is explained on the wiki. So to generate chat links, all you need to do is a waypoint ID and you can generate it on your machine. That’s far more efficient and takes a lot less time than involving a network connection to call a service that simply does some base 64 encoding.

If you want, you can also access our list of waypoint/POI links here: http://wiki.guildwars2.com/wiki/Chat_link_format/0x04_codes

@poke // GW2W //

Theory crafter development

in API Development

Posted by: poke.3712

poke.3712

Hey, I’m somewhat interested but very limited by time, so I might not be a good help :P

Anyway, is the project open source? If so, where is it hosted? And if not: Why? I know from experience that getting developers involved is a lot easier when the project is publicly open sourced; ideally on GitHub where the entry-level to submit small pull requests is very low. This would allow people to quickly submit smaller improvements without having to get involved too much into the project.

E.g. this would be something I would be interested in, given that I can’t really make a commitment to whole project of this size, but would still be interested to help from occasionally.

@poke // GW2W //

API errors & bugs

in API Development

Posted by: poke.3712

poke.3712

Do you have an example? I don’t know any guild with non-ASCII characters, so I have nothing to test this on

@poke // GW2W //

Unclear error code for some nonexistent items

in API Development

Posted by: poke.3712

poke.3712

Good find! Now that you mention it, I’ve seen that thread before too! ^^

@poke // GW2W //

Unclear error code for some nonexistent items

in API Development

Posted by: poke.3712

poke.3712

Usually for items which “do not exist” (either undiscovered, or taken out of the game, or whatever), the error message from `item_details` is the following:

{"error":10,"product":0,"module":2,"line":376,"text":"invalid item_id"}

However, I noticed two ids 43948 and 43949 which produce a completely different error message, in a different product and line:

{"error":10,"product":71,"module":2,"line":135,"text":null}

What is the reason for this, and what does it mean?

@poke // GW2W //

Event API gives incorrect results

in API Development

Posted by: poke.3712

poke.3712

Hey,

it seems that the Event API is currently giving false data. For example the “Frozen Maw event”http://wiki.guildwars2.com/wiki/Protect_Scholar_Brogun_as_he_investigates_the_grawl_tribe is currently being reported as “active” on Elona Reach, although in-game the “Maw is quiet”. This makes event timers a bit useless if you don’t know if you can trust the results or not.

@poke // GW2W //

Item API buff data

in API Development

Posted by: poke.3712

poke.3712

Generally, as the name `skill_id` suggests, the ID there refers to a skill. A skill can be both a skill a player can use but also skills that are used by NPCs or possibly environmental objects.

Unfortunately there is no API for skill data yet, and we also don’t really have a good list of skill ids. The chat link for that “skill” is [&B4A9AAA=] and shows a nameless skill with just the buffs as the description. So it might be just a way for the game to construct the total attributes. You’re probably best of if you just try to interpret the information and sum the attribute values up. That’s what’s happening in the game after all too.

@poke // GW2W //

GW2's Mumble Link "context" data format

in API Development

Posted by: poke.3712

poke.3712

Anti Spy won’t be possible without that […]

Please note that the Mumble data can never be used as a safe authorization mechanism. It’s in a public memory location where I can write to from anywhere, so if I wanted to appear as someone else, I could easily do that, regardless of what information is included in the data.

So if you want to make sure that e.g. the people accessing a world’s data are actually from that world, you will have to use some other mechanism instead. For example a login with a white list or something; or if we get OAuth logins, we might be able to use the GW2 account directly (that also might be the time when we get further account information).

@poke // GW2W //

New API developer

in API Development

Posted by: poke.3712

poke.3712

Wow, that’s certainly a surprise, to see Cliff go. I’m thankful that you launched the API and got the attention back on the “extended experience”. What you started definitely showed that 3rd party tools are a great way to extend the game experience. So thank you for that! And I wish you all the best at your new job, and with your life!

That being said, welcome Stefan! I hope you will be able to live up to the expectations that people have with the announcements of what’s coming for the API. Good luck and I hope you have a good time with the API and us

@poke // GW2W //

[API Suggestion] files => events

in API Development

Posted by: poke.3712

poke.3712

Or just in event_details to keep event_names clean.

@poke // GW2W //

Missing <br> Attribute

in API Development

Posted by: poke.3712

poke.3712

I checked each of those items you mentioned, and each of them contains a multi-line string in the description of the buff. For example:


{"buff":{"skill_id":"19635","description":"+11 Condition Damage\n+11 Precision\n+11 Toughness\n+11 Power\n+11 Vitality\n+11 Healing Power\n+2% Critical Damage\n+3% Magic Find"},"attributes":[]}

Decoding that JSON object will result in a multi-line text like this:


+11 Condition Damage
+11 Precision
+11 Toughness
+11 Power
+11 Vitality
+11 Healing Power
+2% Critical Damage
+3% Magic Find

@poke // GW2W //

GW2.NET a .NET wrapper around the GW2 API

in API Development

Posted by: poke.3712

poke.3712

1.Downloaded the 0.5.0.0 release(this doesn’t happen if I use the latest source code. It works fine with the latest source code.)

And that’s the problem The 0.5.0.0 release was released when the `Inactive` event status did not exist in the API yet. So whenever the API outputs an inactive event, the deserialization fails because there is no equivalent enum value it can map to.

Support for the status was apparently added in the version directly after the 0.5.0.0 release, so you should be fine using any newer version than the released one.

@poke // GW2W //

API errors & bugs

in API Development

Posted by: poke.3712

poke.3712

Okay, I just realized that my JSON prettifier removes duplicate properties, so I’m not too sure anymore if it really wasn’t there before last night xD

@poke // GW2W //

GW2's Mumble Link "context" data format

in API Development

Posted by: poke.3712

poke.3712

I honestly can’t think of a good reason why you would want to validate a character name. Sanitizing data is not neccesary, if you pass it correctly. For databases use parameterized statements so that you don’t need to care about escaping ever; for HTML output escape control characters as usual.

Validating input is not trivial, especially when it’s about names. Also note that strlen is not aware of multibyte strings while GW2 supports those pretty well (we even can use umlauts!). And I would be careful making assumptions about global restrictions when you can just see those that apply for you (e.g. in GW1 I couldn’t enter Kanjis or Hanzis while others could enter those region-specific characters).

@poke // GW2W //

API errors & bugs

in API Development

Posted by: poke.3712

poke.3712

I just found that “map_waypoint_hover” is declarated twice in https://api.guildwars2.com/v1/files.json

Odd. That definitely wasn’t the case an hour ago… o.O

@poke // GW2W //

Render service for item icons (404)

in API Development

Posted by: poke.3712

poke.3712

First tests show that it works fine, thanks a lot for the quick fix!

@poke // GW2W //

Render service for item icons (404)

in API Development

Posted by: poke.3712

poke.3712

The item API was updated to show item icon IDs that can be used in conjunction with the rendering service. (source)

Given that the icon data appeared in the item_details API, I expected that requesting the icon for a random item in the database would work, but so far, all tests I did failed.

For example the “Massive Achievement Chest” with item ID `43763`. The item API gives this:

"icon_file_id":"603245",
"icon_file_signature":"6BA91E0A08689B40B09ECC3FB3C4589493E6C167",

Putting those bits together, the URL should be this: https://render.guildwars2.com/file/6BA91E0A08689B40B09ECC3FB3C4589493E6C167/603245.png – But the render API just returns a 404.

As mentioned, this happened to all items I have tested so far, both new and old items.

@poke // GW2W //

GW2's Mumble Link "context" data format

in API Development

Posted by: poke.3712

poke.3712

Well I don’t want something that could impose a security risk. Something like the account name would work fine. After all, the account name is not really secret; it is visible here in the forums too, and when you add someone to your friendlist using a character name (which is already in the data), then you also see the account name.

@poke // GW2W //

GW2's Mumble Link "context" data format

in API Development

Posted by: poke.3712

poke.3712

That’s very useful, thanks! Although it would be even better if there was some unique per account information so one could identify when a player switches the character. So either an account name, or some internal ID, or even a hash of anything account identifying would be very good.

@poke // GW2W //

API errors & bugs

in API Development

Posted by: poke.3712

poke.3712

Same problem today with the Shatterer on Elona Reach.

@poke // GW2W //

Monospace font for code

in Forum and Website Bugs

Posted by: poke.3712

poke.3712

With the API forum, the code related formatting using Textile or BBCode got a bit more interesting. Unfortunately, no special formatting is set for either code or pre tags. Could you add some styling to make code tags use a monospace font?

Examples:

This is in-line code, it should use a monospace font.

This is a pre block
    it should also use a monospace font.
@poke // GW2W //

Powershell and API's

in API Development

Posted by: poke.3712

poke.3712

TIL about Invoke-RestMethod. That’s pretty cool, thanks for sharing!

@poke // GW2W //

Wiki page for API

in API Development

Posted by: poke.3712

poke.3712

As a wiki administrator, I’d like to request that any further discussion of the API article take place on its talk page on the wiki where everyone can see it.

Seconded.

@poke // GW2W //

API errors & bugs

in API Development

Posted by: poke.3712

poke.3712

Hmm, ever since the Claw of Jormag event finished on Elona Reach, the API is stuck on the event being “active” although it should be “success” instead. Is there some problem with the event?

@poke // GW2W //

c# - How to load matches.json with RestSharp

in API Development

Posted by: poke.3712

poke.3712

You can also create another type that just holds your results, as I did here with the EventList type.

E.g.

public class MatchList
{
    public List<Event> WvwMatches
    { get; set; }
}
@poke // GW2W //

GW2.NET a .NET wrapper around the GW2 API

in API Development

Posted by: poke.3712

poke.3712

Hi everyone, mostly out of curiosity, why do you require a plugin to perform the task?

I assume you mean RestSharp? The reason is simply to not re-invent the wheel. The RestSharp library (not a plugin) makes using REST resources very simple and consistent. And especially later when the API is expanded and adds some authentication mechanism, you can just configure RestSharp once to use it and you’re done.

Of course you can write it all in standard .NET framework code—RestSharp is written like that too after all—but you can save quite a bit of work by reusing working and tested libraries.

@poke // GW2W //

API Contest, prize help needed

in API Development

Posted by: poke.3712

poke.3712

Usually you would start a content to make people contribute, but if you look closely on day 3 of the API, there are already a lot people working on things, so a contest does not really make sense to motivate them (they are already motivated).

Also, while this first release of the API is definitely nice, it’s still not much and the possibilities what to do with them will be reached rather quickly. So I would suggest you bring this topic up again, when we have more interesting API access.

@poke // GW2W //

Live Score Update Image Generator

in API Development

Posted by: poke.3712

poke.3712

You should consider caching those images for a bit. Especially as signatures I wouldn’t want to get a new image every single time.

@poke // GW2W //