Showing Posts For Lawton Campbell:

Restrictions call on APIs ?

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

There are currently no enforced restrictions — we might add rate limiting if there’s a problem. My general recommendation is sticking to 1 request/second on average (e.g., under 80k requests/day).

20,000 API calls is a lot — are these authenticated requests? It should take much fewer to get all of the unauthenticated data out.

HTTPRequest in javascript welp :(

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Here’s an example for you. Should run fine in a browser — for node.js you’ll need to use a different method for fetching data.

Getting gem conversions

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

There’s an open issue but the implementation has some unfortunate technical blockers.

EDIT: I probably should have linked the issue here after I made it, whoops.

(edited by Lawton Campbell.8517)

API errors & bugs

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

All three are Quip. The first is a Legendary pistol, the second is a Legendary Hammer and the third is a Legendary Rifle….

Those are some of Scarlet’s weapons, wielded during the Queen’s Jubilee. I’m not sure how they got onto the API or why they’re called Quip, but this isn’t the first time it’s come up so I’m just going to blacklist them.

:<

Client-side API for DPS via MumbleLink?

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

I’m not going to change the MumbleLink data format any further — it’s plagued by issues currently. One of my long-term lofty goals that may never happen is to build an opt-in websocket-based API into the client so that local and web applications can query for real-time info. Here’s the github issue for that dream.

To expand further on the MumbleLink data issues — the format allows only a fixed amount of data in the field, which effectively prohibits its use as a chat log. Moreover, because writes/access to the shared memory are unsynchronized, applications often get half-baked data (e.g., they read it while the client is in the middle of writing). We’re stuffing JSON into the description field, so this manifests as reading invalid JSON. We’ve mostly stuck to the guidelines and only put data that rarely changes in there, so it’s not terrible, but the format is highly restrictive.

Transparent trait icons in /v2/traits/

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

There might be a reason it’s like that, there might not. The icons returned by the API are the same textures used in-game; unfortunately I don’t have much insight into how art works.

This is probably a wontfix.

Order of "/v2/minis"?

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

By my reading, the bank sorts minis alphabetically. The hero panel sorts against {locked, order, name} in that order, i.e. two minis with the same order value will be sorted by name.

Let me know if I’m totally wrong and I’ll dig around some more.

Get the position of the trait

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Created an issue for this. You can currently get the trait ordering from /v2/specializations — the order of the major_traits field is “tier 1 top, tier 1 middle, tier 1 bottom, tier 2 top …”. It’s horrible and implicit so I’ll try to duplicate that information in a more clear way.

WvW changes and the API

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

So we can assume that there will be breaking changes to the API?

Depending on what changes, there may be breaking changes to the API. In that situation I would try to make it as simple as possible to update applications (and ideally keep applications mostly-working after the changes land).

Sorry for being coy; there really isn’t much I can say until whatever the changes are are announced.

Access to guild mission list

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Haven’t really looked into how guild missions work internally so I can’t promise anything, but here’s a tracking issue anyway.

Find Guild ID for API

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

You can use the old v1 endpoint to look up a guild by name, e.g., /v1/guild_details.json?guild_name=Arenanet. That’ll give you back the guild_id for any guild you want. I should probably add that functionality to the v2 endpoint, but haven’t gotten around to it yet.

WvW changes and the API

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

To add to that, I’ll open a pull request on github and post an announcement of the API changes on the forums when the WvW changes are announced. That’s about as much as I can share right now, though.

Tile service

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Ick, yeah that’s something that should be done. I made a github issue for it; it’s going to take quite a bit of work since the tool that actually generates the tiles bitrotted fairly badly and needs some pretty heavy modifications to work again.

Request: View guild vault log

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Made a pull request for this. Had most of the bits lying around to implement it, went ahead and finished it off. Should go out with the next deploy (probably mid next week), let me know if you have any suggestions for changes to the output format before then.

Request for choosen character utility skills

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Still on the to-do list; still need to implement the backend support for dumping skills. :<

guild/log Kick events with no user details

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Here’s the tracking issue. Going to try to fix this within the next couple of weeks.

Chat log

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Omg i just made a topic about Combat log > log.txt…..
Seems like they do want to make something like this but the Dev doesnt get the time.

If we can only donate money for a Dev team (so the community can give money for something..) :-P well lets hope we get something! even a txt file would do!

If you’ve got one, I wouldn’t mind the donation of a time machine.

:P

Request: Add Vendor buy prices to API call

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

I admit this will not help with the first issue (the test vendors), i will not ask where they are located or what they are actually selling, but maybe one of those 2 answers may be a reason to recognize them as actual test vendors.
As for the second issue, it should not be an issue anymore.

A better example was the skritt vendor that displayed the halloween skins available for the wrapping paper raffle. He’s no longer player-accessible, but there’s not a good way (AFAIK) to programatically determine that. Another interesting vendor is the one available with the Tarrktun Personal Delivery Portal which is player-accessible, but not via NPC (when you use the portal there are bulk quantities unavailable from the NPC vendor).

Anyway, it’s really tricky to get right, and because of that it’s a few notches lower priority in my backlog. Also noticed there wasn’t an existing issue for it, so here’s a tracking issue. Can’t promise it’ll get implemented anytime soon, but it’s on the list.

New endpoints: more PvP-related goodies

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

- Is it possible to add start/end date/time of the seasons (i.e. Season 2 from Feb 23th to April 18th).

Yeah — I’m gonna need to hardcode them (the season times are config-based and only store the current season start/end, iirc), but there are few enough seasons/year that maintaining it shouldn’t be an issue. Should have done that to start with.

- Is there any chance that the /v2/pvp/games api delivers pips won/lost per game? Otherwise I have to calculate this by my own…

It’s on my backlog, but there are some technical issues to work through. I’m not sure I’ll be able to get more detailed match data (including per-match pip changes) in by the end of the season. My recommendation is to use /v2/pvp/standings to compute it in the meanwhile (which is very suboptimal, but alas).

Request: Add Vendor buy prices to API call

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

This is something I’ve looked into previously, and it’s unfortunately not technically feasible to expose via the API. The problem basically boils down to two big issues:

  • It’s not possible to determine which vendors are player-accessible. There are some test vendors that you’ll never see which sell things for fairly cheap prices, and no good way to tell them apart from player-accessible vendors.
  • Vendor prices are per-vendor, not per-item: different vendors may have different prices for the same item. An example of this are the Dry Top vendors, whose wares are sold for a conditional amount.

Sorry

New endpoints: more PvP-related goodies

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Been turning these on gradually over the past week or so and figured there was enough functionality between them to make an announcement post. So, without further ado, some new endpoints:

/v2/pvp/seasons (github)

Provides bulk-expanded unauthenticated access to PvP season data. The season ids are referenced from both /v2/pvp/games (ranked games playing during a season will have a season_id field) and /v2/pvp/standings. It doesn’t currently indicate which season is the current season (or the start/end dates) — that functionality will land in a future release.

/v2/pvp/standings (github)

Provides authenticated access to your PvP season standings (including past seasons). This currently only includes the division standings (not leaderboard position) — hoping to get the leaderboard bits in at a later date.

/v2/guild/:id/teams (github)

Provides authenticated access to your guilds’ teams. Currently only available to guild leaders (though I’m debating relaxing that restriction for this endpoint). It provides aggregate match data (similar to /v2/pvp/stats). Hoping to add per-team game history at some point in the future, but that will likely be a separate endpoint.

Let me know if you have any questions/concerns or find any bugs!

/commerce/exchange error bad parameter

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Thank you! Ah cool, I will use the GitHub issue tracker next time.

Whichever’s easier for y’all, it’s no biggie having reports on both. I just like having everything in Github so I can have a kanban-style interface for tracking the million things that need to be done.

/commerce/exchange error bad parameter

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Huh, that’s not good. Looking into it now; here’s a tracking issue.

Can't access transactions/history

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Do you know how high can these numbers get?

In the database they’re stored as a bigint (maximum 2^63), but since we’re serializing to JSON the API will break after they exceed 2^52 (because JSON encodes numbers as IEEE 754 doubles, that’s the maximum integer that can be exactly represented). So storing them as a 64-bit integer on your side should be safe.

Daily achievement missing

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

I think that was a cache issue — the daily achievements are automatically whitelisted (they bypass the normal manual approval). The master list of whitelisted achievements was probably just cached for a while after reset (it’s got a fairly long cache duration since it only updates once/day at most — since usually it’s a manual process).

IIRC this happened because there were new dailies released yesterday, so this shouldn’t happen too frequently.

Missing Achievements from account/achievement

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Yes, it is gone now. I will keep an eye out for additional issues.

So, #561 came back up on the whitelist today, which means that it’s being returned by /v2/account/achievements (for someone). It’s kind of gross, but there’s someone out there for whom it displays in the in-game UI, so I’m going to leave it as-is in the API.

Could it be some kind of GM or test account? There are als accounts having Ad Infinitium and the legendary pvp backpiece although it is not available to players.
Otherwise I have no idea how this achievement could be unlocked at all (some glitch maybe?)

Seems legit; there’s well over 10k accounts with that achievement unlocked :/

That aside, the account you’re looking at is probably a special account. I’m hoping to have that PR implemented and deployed this week or next so you can filter those out to ignore for leaderboards and stuff.

Missing Achievements from account/achievement

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Yes, it is gone now. I will keep an eye out for additional issues.

So, #561 came back up on the whitelist today, which means that it’s being returned by /v2/account/achievements (for someone). It’s kind of gross, but there’s someone out there for whom it displays in the in-game UI, so I’m going to leave it as-is in the API.

Can't access transactions/history

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Just to verify, if you fetch the URL that doesn’t work (with access token, etc) with a browser does JSON come back?

I’ve never used RestSharp, so I can’t really help if the issue isn’t with a broken endpoint. I’d imagine the purchased_date field needs to be marked optional or something for the deserializer to work (but that it gives you no exception or error code about a deserialization failure is really weird).

Adventure times, rankings and account boni

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Exposing adventure leaderboards is a good idea, opened an issue on github for you.

And another issue for the account-wide bonuses.

Thanks for the suggestions!

/v2/wvw/ Shrine Data

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Currently technical reasons — the shrine state (and ruins before them) isn’t piped out of the game servers in a manner the API can currently access (e.g., you can’t see the state on the world map when you’re in EB or a different BL). There’s kind of an unplanned fix but I have no idea when it’ll make it to live. Tracking issue.

Missing Achievements from account/achievement

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

An extra achievement appeared in the “Fire and Frost” category.
“Minor in Achievement”, duplicate from SAB world 1 achievements

Whoops, I did an import from the historical log data yesterday and thought I’d gotten all the broken achievements out of it. Removed #561 from the whitelist, should be fixed in a couple of minutes. Thanks for helping with this

Attributes are missing for some items

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

So, the Opal trinkets were originally magic find stats which were removed a couple of years ago. When the magic find equipment attributes were removed, the stats of affected items were adjusted to be one-time choices. There’s a long-standing issue with choosy-attribute items in the API wherein they (1) aren’t indicated as choosy-attributes in /v2/items and (2) don’t display which attribute set was selected when viewed from the inventory-returning endpoints.

There’s an open issue on Github to correct this — my machine is currently throwing a fit so I can’t dig the issue up right now.

Dunno where to ask this

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

I have been recently using GW2 Efficiency website and noticed that there seems to be a delay on the actual TP costs of items. I am sure it goes through a certain API that probably updates every couple of minutes. Am I correct?

Yeah, the APIs on our side have cache times between 1-5 minutes, so any data returned by them is potentially a bit stale. This is done to decouple the API from the various servers it talks to so that the API can catch fire without taking down parts of the game.

One last thing. I always wanted to know how to make an overlay with visual studio for GW2. I would like to write something small for myself during raids, but don’t know how to start.

Someone else will have to chime in on this bit; it seems like there are a lot of Overwolf applications but I don’t know anything about them.

Missing Achievements from account/achievement

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

I would prefer if they were blacklisted or moved into a historic category to keep the WvW achievement category clean.

Eh, the client doesn’t display achievements that have the “Hidden” flag if the account has no progress towards them. My recommendation is to either mimic that behavior or to blacklist them on the application side.

Authenticated: Commerce/Transactions/History

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Authenticated: Commerce/Transactions/History

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Seems like a documentation issue. The endpoint is actually paginated, and respects both the page_size and page query parameters. Try using ?page_size=200&page=0 to start, then increment page until it stops returning results.

Setting guild permissions from the API

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

You can reach me at lawton@arena.net (or via forum PM), but I prefer communicating API stuff via the forums or on Github to reduce duplication (e.g., other people likely have the same questions/concerns). It’s easier when everything’s in the public.

WvW Oasis PvE event API to create timers

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Made a tracking issue for this. I’ll try to pull it in for the next sprint, I’m not sure I’ll have time to get to it next week (e.g., it won’t be available on live in the next month, at least).

Setting guild permissions from the API

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

I believe its been stated that there will never be API’s that allow you to change stuff server side.

Pretty much this.

It’s mostly for technical reasons, TBH. The APIs really just aren’t designed to be able to write data — we’d have to do some rearchitecting to make it not set the world on fire (and there’s too many other more important things in the backlog to bother).

Map Completion

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Not currently; there’s an open issue to add support.

Request for /pvp/games and /pvp/stats

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Backend support should be in, but I’ve been out sick all week so I haven’t been able to get anything done. I’m doing a deploy today (which includes frontend support for some of those additions) but I’ll probably waffle until next week before turning it on.

Elite Specialization Icons?

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

I was thinking it would make more sense (maybe?) to include it in /v2/specializations — it’s kind of a weird place because only elite specs would have icons, but it makes more sense to me, semantically. Also it’s where they’re stored in content, iirc. Issue for elite spec icons.

I’ll have to root around for those map marker icons and see what I can turn up. Issue for more icons.

New endpoints: guild ranks/members.

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Just a quick question, how are “guild leaders” defined?
Is it any rank with all permissions or just the highest rank in the guild or …?

The top-most rank in the guild UI panel is special; it’s the “leader” rank (has id=1 in the API). It’s not just any rank with all permissions.

Old PvP Ranking API

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

How old are we talking? We should be able to expose the Season 1 standings (division/pips) but anything earlier than that is going to be a bit more work. The game histories are already dumped out via /v2/pvp/games, but due to our retention policies we can only save the last ten games, so anything older than that is lost (there’s a variety of sites that will save your game history for you).

Missing Achievements from account/achievement

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

EDIT: Just realized it might just be a misunderstanding of the account/achievements functionality. These are achievements I haven’t started and thus have no progress. Is that the issue, or should it still show achievements I haven’t started?

It only shows achievements for current > 0 — if the achievements haven’t been started nothing is stored in the account record (which is where that data is coming from). I’ll see if I can get the documentation updated; sorry about the confusion :<

Old PvP Ranking API

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Hoping to have it ready around the start of Season 2. Here’s the github issue.

I’m not planning on exposing the predicted win/loss % or per-match pip loss/gain, but it will expose your current division/pips/etc.

API errors & bugs

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Is the WvW API misreporting Kills and deaths? I am seeing some maps reporting 0 kills and deaths at the end of the week. I am pretty sure this isn’t the case in Tier 1. The maps that are reporting deaths and kills seem to be terribly low.

There was some really terrible code I wrote in there that was causing both the NA and EU resets to flush all the data. It only recently manifested because we fixed EU event reporting a couple of weeks back, and should be fixed with the next release. Github issue.

Missing Achievements from account/achievement

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

The API is showing me all 12 achievements of the category “Bosses”.

Right, but he’s saying that some of them aren’t being returned by the authenticated /v2/account/achievements endpoint if you’ve completed them.

What am I missing? They are being returned as completed if I use my API key and return as uncompleted if I use the API key of an account who does not have them completed. So to me it looks like they are working?

Oh, fair.

@PBag can you PM me the API key you’re using?

API Request: Shared Inventory Slots

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

Yep, there’s already an open issue. The endpoint is pending some backend support that should go out with the next release.

Missing Achievements from account/achievement

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

Next

The API is showing me all 12 achievements of the category “Bosses”.

Right, but he’s saying that some of them aren’t being returned by the authenticated /v2/account/achievements endpoint if you’ve completed them.

I’ve no idea why this is happening; I’ve made a separate issue on github to track it.

Though some historic ones like Group Effort I to V in the Escape from Lion’s Arch category are still missing
http://wiki.guildwars2.com/wiki/Escape_from_Lion's_Arch_%28achievements%29

I just queried the historical logs for all achievements awarded from 2014-01-01 to today and whitelisted almost all the ones that weren’t already whitelisted (only one I omitted was the 4 year birthday achievement — which is impossible for normal accounts to have acquired).

That set did include the Group Effort achievements (among a bunch of others) so those should be appearing shortly on the /v2/achievements endpoint. I’ve no idea why those aren’t being automatically whitelisted, since presumably they’re being returned from /v2/account/achievements. :/