Showing Posts For Eearslya.6309:

Any API update for WvW Skirmishing?

in API Development

Posted by: Eearslya.6309

Eearslya.6309

I just want to bump this up again for a reminder that this still needs to be done. I’m right now in the mist of making a script that displays/processes WvW data and it would make my(and probably many others) job easier if we can get this out.

Thanks.

victory_points are already exposed in the API (once it comes back up).

is this new? Because as far as I can find on any site (wiki,forums,all wvw sites) they all say its not exposed.

Got pushed out 3/16, but the API fell over shortly afterwards, so I’m guessing nobody had the time to update code.

gitter ref

Blackgate
Harbinger Tryssa – Revenant

Any API update for WvW Skirmishing?

in API Development

Posted by: Eearslya.6309

Eearslya.6309

I just want to bump this up again for a reminder that this still needs to be done. I’m right now in the mist of making a script that displays/processes WvW data and it would make my(and probably many others) job easier if we can get this out.

Thanks.

victory_points are already exposed in the API (once it comes back up).

Blackgate
Harbinger Tryssa – Revenant

/v2/items/xxxxx

in API Development

Posted by: Eearslya.6309

Eearslya.6309

From what Lawton has said before, items are not supposed to change until an actual build. So you can check /v2/build every now and then until it increments, then you know to re-check your items. However, new items can appear between builds, so you can just check the /v2/items endpoint for the list of IDs and see if anything is new.

The Cache-Control header will almost always return a value of 5 minutes only, unless you’re dealing with trading post APIs, so that probably won’t help.

Blackgate
Harbinger Tryssa – Revenant

Unsure how to read v2/currencies

in API Development

Posted by: Eearslya.6309

Eearslya.6309

As is the case with most v2 endpoints, the base endpoint will return an array of IDs that you can then request more information about. This is so you can request more with a URL like /v2/currencies?ids=1,2,3 which will return an array containing the information on IDS 1, 2, and 3.

In your case, if you want all the currencies at once, the request you want is /v2/currencies?ids=all which will give you all available information.

Blackgate
Harbinger Tryssa – Revenant

Commerce API - Differences

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Not quite sure how you’re getting the exact same data for both endpoints..They have distinctly different roles.

/v2/commerce/prices shows only the highest buy order and the lowest sell order, so you can quickly determine what the price is on the trading post. example

/v2/commerce/listings shows you all the buy and sell orders for the item. example

EDIT: Ah, wait..I understand the question now. Yes, their base endpoints will return the same list of all the item IDs, but that’s just how the v2 ID-expanded APIs work. They all work similarly so you could, in theory, write one function in a program to fetch 1 endpoint, and it’ll work for them all.

Blackgate
Harbinger Tryssa – Revenant

(edited by Eearslya.6309)

Is inventory item is actually soulbound?

in API Development

Posted by: Eearslya.6309

Eearslya.6309

1. No. That’s a feature that will be implemented at some point, but at the moment, it is not.

2. Most endpoints can have stale data up to about 5 minutes so that the game servers aren’t bogged down by sending their data to the API servers.

EDIT: Sniped by Lawton. Welp, I tried.

Blackgate
Harbinger Tryssa – Revenant

Getting all Items [Names not just IDs]

in API Development

Posted by: Eearslya.6309

Eearslya.6309

The way I’ve done it recently is to fetch the first page of 200 and discard everything but the header, and use the X-Page-Total header to determine the page count. The way I see it, it’s not that different from requesting the base endpoint first and chunking up the array into blocks, in terms of API access. (Plus it’s simpler for C.)

Blackgate
Harbinger Tryssa – Revenant

API errors & bugs

in API Development

Posted by: Eearslya.6309

Eearslya.6309

I was updating my list of items when I came across this one:

{"name":"",“description”:“Double-click to apply to a piece of armor.”,“type”:“UpgradeComponent” … }

https://api.guildwars2.com/v2/items/63366

According to the image, it should be a superior rune of some kind… (but it has no bonusses!)

Oddly enough, that item is actually in-game as well. And craftable too, no less!

Blackgate
Harbinger Tryssa – Revenant

Trading Post: not-collected items & gold

in API Development

Posted by: Eearslya.6309

Eearslya.6309

It’s been requested, and it might become a feature someday, but at the moment, no.

Blackgate
Harbinger Tryssa – Revenant

WvWvW: API

in API Development

Posted by: Eearslya.6309

Eearslya.6309

-The wiki doesn’t mention the language parameter for the objective URL. But the settings work.

Sure it does, right at the top!

lang (string, optional) – Request localized responses.

It is worded a little strange, but that’s what that parameter is used for.

Blackgate
Harbinger Tryssa – Revenant

WvWvW: API

in API Development

Posted by: Eearslya.6309

Eearslya.6309

EU matchups not showing kills and deaths is a known bug at the moment. As for the coordinates, they show up fine for me. What URL are you requesting?

Blackgate
Harbinger Tryssa – Revenant

Are you a Revenant "Prepper"?

in Revenant

Posted by: Eearslya.6309

Eearslya.6309

Wow. So many people will have nothing to aim for within one hour of creating their new alt. Create rev..max level it, max gear it…have nothing to do.

Well, y’know, except..Masteries, raids, the entire expansion’s worth of content…

Blackgate
Harbinger Tryssa – Revenant

Confusion about Confusion

in API Development

Posted by: Eearslya.6309

Eearslya.6309

The traits/skills API is..unintuitive, and the devs have admitted this. It was never structured to be crawled through programmatically. All this data is simply what is used to render the tooltip, not actually what goes in to calculating the skill.

However, in those two cases I’d simply check the status field for Buff/Condition, and the text field for Stun/Daze. It may not work 100% of the time unfortunately, but there’s really no better option right now.

Blackgate
Harbinger Tryssa – Revenant

502 Error

in API Development

Posted by: Eearslya.6309

Eearslya.6309

This is still happening for me, at random times and it doesn’t seem to be associated with a specific endpoint either. Although at this moment I can access tokeninfo fine, but not characters. I was able to access characters just a few minutes ago, then the error started appearing.

Blackgate
Harbinger Tryssa – Revenant

Launching /v2/commerce/transactions

in API Development

Posted by: Eearslya.6309

Eearslya.6309

You’re hitting the default page limit. Use the ?page and ?page_size request variables (max size of 200 per page) to get more results.

Blackgate
Harbinger Tryssa – Revenant

Are you a Revenant "Prepper"?

in Revenant

Posted by: Eearslya.6309

Eearslya.6309

…Maybe a little.

Attachments:

Blackgate
Harbinger Tryssa – Revenant

Immport prices from specific time?

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Spidy has their graphs because they constantly check and record the prices every 15 minutes or so. There is no way to get historical data from ANet, you have to poll the API and record it all yourself, unfortunately.

Blackgate
Harbinger Tryssa – Revenant

v2/account/wallet id=17

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Last time someone asked about this, I believe Lawton clarified it was Glory, which is obviously no longer in use in the game.

Blackgate
Harbinger Tryssa – Revenant

Tonight's stress test

in WvW Desert Borderlands Stress Test

Posted by: Eearslya.6309

Eearslya.6309

That’s how it’s been in the past; ask around when the stress test starts and you’ll probably find at least one guild hosting a teamspeak you could use.

Blackgate
Harbinger Tryssa – Revenant

Unable to log in w/downloading wvw beta

in Bugs: Game, Forum, Website

Posted by: Eearslya.6309

Eearslya.6309

Right- but when I try to log in to NOT THE BETA but the REGULAR GAME, I cannot.

If you are using the beta client, you are trying to log into the beta. You can’t pick and choose which server it connects to.

Gw2.exe will connect to the real game.
Gw2FeaturePublicTestTiny.exe will not.

Blackgate
Harbinger Tryssa – Revenant

Delivery Box?

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Nope, though it’s been discussed a few times here. It’ll find its way into the API at some point, I’m sure.

Blackgate
Harbinger Tryssa – Revenant

Unable to log in w/downloading wvw beta

in Bugs: Game, Forum, Website

Posted by: Eearslya.6309

Eearslya.6309

The WvW test client will not log in to regular servers. That’s the whole reason they have a seperate client.

Blackgate
Harbinger Tryssa – Revenant

Skins and dyes in order

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Well, for dyes you’d be correct, there’s no way to display them in order right now besides manually coding it in. However, skins are always listed in the wardrobe panel in alphabetical order.

Blackgate
Harbinger Tryssa – Revenant

Crash report window when exiting

in Bugs: Game, Forum, Website

Posted by: Eearslya.6309

Eearslya.6309

Every time I close my game, whether it be through Alt-F4 or opening the Escape menu and hitting ‘Exit to Desktop’, the game closes normally, but the crash report window appears and closes itself a second later. This bug happens every time I close my client; regardless of where I am (including character select) or what I’ve done.

Blackgate
Harbinger Tryssa – Revenant

New endpoints: wallets and unlocks

in API Development

Posted by: Eearslya.6309

Eearslya.6309

I noticed on the API application to generate a new key.. there is Minipets and Finishers, but no API for it?

The permission is bigger than the endpoints we have currently. So, presumably, when those endpoints do come out, that permission will apply to them as well.

Blackgate
Harbinger Tryssa – Revenant

API that allows you to see Character

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Right now, the API can provide bank and inventory. Soon, it will provide equipped specializations/traits. The 3D model, however…It’s been discussed that we might get a static image of our character, like what we see on the character select screen, but I’m doubtful a full 3D model would be made available by the API.

Blackgate
Harbinger Tryssa – Revenant

Characters API Bug

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Does the page_size variable not work? As far as I knew, the page size defaulted to 50 on all endpoints, but could be expanded to 200 with ?page=2&page_size=200. I don’t have an API key with 50+ characters, so I can’t test, but it’s something you can try.

Blackgate
Harbinger Tryssa – Revenant

Apiv2 specializations usage

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Still, the specializations api is listed on the api wiki page.

Well, yes, I wrote that page because /v2/specializations seemed to be much LESS in beta and likely to change..and because, for the most part, I have nothing better to do with my time.

Blackgate
Harbinger Tryssa – Revenant

Apiv2 specializations usage

in API Development

Posted by: Eearslya.6309

Eearslya.6309

It was sort of announced in the comments of a Github pull request. I’m guessing they chose not to announce it here on the forums because /v2/traits is still /v2/traits-beta. They didn’t want to announce /v2/specializations because it sort of depends on /v2/traits to fully get its info.

Blackgate
Harbinger Tryssa – Revenant

API V2 authorization explanation

in API Development

Posted by: Eearslya.6309

Eearslya.6309

I’ve also updated the wiki page so hopefully this confusion can be avoided in the future.

Blackgate
Harbinger Tryssa – Revenant

General API questions

in API Development

Posted by: Eearslya.6309

Eearslya.6309

There is no limit per se, but the devs have asked that we try not to overwhelm the API servers with requests and cache our data whenever we can; and you can easily see all the item IDs just from the items endpoint

Blackgate
Harbinger Tryssa – Revenant

API error with Python 2.7.10; Please help! :D

in API Development

Posted by: Eearslya.6309

Eearslya.6309

I don’t know much about Python, but one thing that I notice right away is that you’re trying to use both the access_token parameter and a header. You only need one or the other; the page may be failing to load because of this.

Blackgate
Harbinger Tryssa – Revenant

About items that are not in the API

in API Development

Posted by: Eearslya.6309

Eearslya.6309

The items are in the API just fine, but no, mystic forge recipes are not currently in the API. There have been a few requests for this already, but no official pull request on the GitHub.

Blackgate
Harbinger Tryssa – Revenant

Issues with Account APIs (Bank/Inventory)

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Seems like accounts with 9+ (<256 slots) bank tabs are affected. Can anyone confirm?

Yeah, I have 9 bank tabs exactly (in-game).

Blackgate
Harbinger Tryssa – Revenant

Issues with Account APIs (Bank/Inventory)

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Yeah, they’re very right. According to my database, this started happening yesterday around 3PM. After the first bank slot, there’s a ton of invalid nulls before it shows the rest of my bank. …Funny enough, it’s exactly 256 nulls, the same number as the last issue we had with the bank.

Blackgate
Harbinger Tryssa – Revenant

Way to list all guilds a guild member is in?

in API Development

Posted by: Eearslya.6309

Eearslya.6309

https://forum-en.gw2archive.eu/forum/community/api/API-to-show-what-guilds-I-am-in/first Basically the same thing, just with their API keys instead of yours.

Blackgate
Harbinger Tryssa – Revenant

API to show what guilds I am in?

in API Development

Posted by: Eearslya.6309

Eearslya.6309

/v2/account gives a list of all the guilds your account has joined. However, it provides guild IDs. You’ll need additional API calls to /v1/guild_details.json to convert those to guild names/tags.

Blackgate
Harbinger Tryssa – Revenant

Launching inventory endpoints

in API Development

Posted by: Eearslya.6309

Eearslya.6309

I’ve been thinking about this; I think I’m going to add a “builds” permissions that grants access to traits/skillbar/equipment — such that you can get the “equipment” with either the “builds” or “inventory” permissions.

It might be kind of gross like that, but having it enabled by “inventory” allows the “dude-wheres-my-mini.com” use-case for solving “which character has my ascended gs?”

If you wanted to make an endpoint just for builds, perhaps all that is necessary to give is the stats/runes/sigils of the armor and weapons, rather than the actual items and skins equipped?

Blackgate
Harbinger Tryssa – Revenant

Launching inventory endpoints

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Is the materials end point down right now? can’t seem to access it at all getting error.

{"text":"ErrUnknown"}

Seems to be working fine for me, both /v2/materials and /v2/account/materials. Where and how are you trying to load it?

Blackgate
Harbinger Tryssa – Revenant

Launching inventory endpoints

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Thanks for those amazing APIs!

I am currently having issues with invalid(?) inventory item IDs.
As an example, from the character API I get the ID 8702 for what are supposed to be my harpy feathers. The item API then tells me that there is no such ID.

I’ve uploaded a page to http://gw2maps.ch/char/. All the broken image icons show items with invalid IDs (the ID is visible in the html elements title). For me that’s quite a bunch. I can pass on my access token if that helps.

Here’s a list of IDs I get which seem to be invalid:
8702, 8764, 8680, 8678, 8714, 8464, 8677, 8729, 8733, 8696, 6467, 8704, 4646, 4579, 37274, 8781, 8792, 8698, 4651, 42041, 8789, 39141, 39151, 4652, 4582, 4585, 4653, 4655

This has been a long-standing issue. (See: https://forum-en.gw2archive.eu/forum/community/api/Item-IDs-Omitted-from-API/first )
The problem with the items endpoint is every item currently has to be manually whitelisted in order to show up in the API. (So they don’t accidentally release some in-progress HoT item or such.)

Blackgate
Harbinger Tryssa – Revenant

Launching inventory endpoints

in API Development

Posted by: Eearslya.6309

Eearslya.6309

So, I just made a simple page that fetches all the items in my bank and displays them on the page for me. It works fine, except for one problem.

For whatever reason, the last 14 bank slots are returned as null. They’re not empty, they’re full of Bloodstone Dust, Empyreal Fragments, and Dragonite Ore. I have 9 bank tabs, and they all work fine except for the last tab in those final 14 slots.

EDIT: After a little more thought, I realize that 270 (9*30) minus 14 is 256. So apparently anything over 256 slots isn’t shown?

Blackgate
Harbinger Tryssa – Revenant

(edited by Eearslya.6309)

Launching /v2/characters

in API Development

Posted by: Eearslya.6309

Eearslya.6309

So quick question for the devs, I was messing with the API earlier after I had left a guild, and I noticed that my characters are still shown as representing that guild, even though it no longer shows up in /v2/account. Is this intentional or a bug?

Blackgate
Harbinger Tryssa – Revenant

API key and Request library, how to? (Python)

in API Development

Posted by: Eearslya.6309

Eearslya.6309

The simplest way is to just add the access_token parameter to your URL.
e.g. https://api.guildwars2.com/v2/account?access_token=ABCDEF-1234

Blackgate
Harbinger Tryssa – Revenant

authorization header and preflight requests

in API Development

Posted by: Eearslya.6309

Eearslya.6309

I believe I’ve seen this issue posted before. The solution I saw then was to pass the API key as ?access_token=APIKEY instead of in the header. Not a perfect solution, but it’s probably your best bet.

Blackgate
Harbinger Tryssa – Revenant

Item IDs Omitted from API?

in API Development

Posted by: Eearslya.6309

Eearslya.6309

Is there any update on this issue? I’ve just come across it myself while trying to find the Wintersday ornament items.

Blackgate
Harbinger Tryssa – Revenant

how to query all ids at once?

in API Development

Posted by: Eearslya.6309

Eearslya.6309

I’m using PHP in my implementation, but the logic behind my answer is about the same. Simply use /v2/items?page=0&page_size=200 to fetch 200 items at once. You can read the X-Page-Total HTTP header to know how many other pages there are. Then you can fetch all 206 (currently) pages of items with threads and do what you need with them there. /v2/items?page=1&page_size=200 and so on.

Blackgate
Harbinger Tryssa – Revenant

When will closed beta emails be sent out?

in Guild Wars 2: Heart of Thorns

Posted by: Eearslya.6309

Eearslya.6309

The e-mail doesn’t actually matter. Log into your account and check if you have a beta character slot. If not, then definitely talk to ANet.

Blackgate
Harbinger Tryssa – Revenant

Correct way to use item ID's to get item info

in API Development

Posted by: Eearslya.6309

Eearslya.6309

So you are suggesting instead of doing a long line of ID’s (?ids=1,2,3) the best way to get the data is:

  1. Get the X-Page-Total from the HTTP header on a URL like this:
    - https://api.guildwars2.com/v2/commerce/listings.json?page=0?page_size=200
  2. Loop through the “page?=LoopNumber” until i hit the X-Page-Total

I tried doing this quickly and when using the above URL despite my “?page-size=200” i get a page_size of 50 and a x-page-total of 450 in the HTTP header. When using the ID’s i could loop 200 of them and get around 113 requests. Do i ignore the page-size and x-page-total and use the X-Result-Total/(maximum page-size).

The parameter is page_size (with an underscore, not a dash). Also, if you want to pass more than one parameter, you seperate them with an ampersand (&).
So, the request would be /v2/items?page=0&page_size=200

Blackgate
Harbinger Tryssa – Revenant

Correct way to use item ID's to get item info

in API Development

Posted by: Eearslya.6309

Eearslya.6309

X-Page-Total, see attachment

I..was actually unaware you could simply request by page number. This would actually be a lot simpler, I might implement this instead. Thanks!

Blackgate
Harbinger Tryssa – Revenant

Correct way to use item ID's to get item info

in API Development

Posted by: Eearslya.6309

Eearslya.6309

You may want to create a database for the item data and only request them once a week or day.

For requesting massive data you should use pagination. This will reduce the amount of requests to v2/commerce/prices from 22480 to 113 when using a page_size of 200 (maximum value.)

See wiki for details about pagination.

I don’t think this is what i am looking for. Unless there is a way to use the pagination to speed up multiple requests with individual ID’s. Optimally i am looking for a solution which creates something like “?ids=all” for items, as my current solution for looping requests with the individual ID’s is a slow process.

I understand using pagination would be a good way to do it if it was outputting the content onto a page directly with each call. This would then use pagination to show the first 100 items with buttons to load the other items.

I am trying to find the best way to get all of the content into a json file which can then populate a database. For the items and their information i would update them on a daily basis if they content had changed but for the prices and other more dynamic data i would like to update that more frequently.

The way I populate my database is by first checking the /v2/items endpoint and getting every ID. Then I loop through them, creating a request URL that consists of around 190 IDs (because for some reason 200 didn’t always work for me), then storing that URL in an array, and moving on to the next URL with the next 190 items. Then you simply loop through those URLs instead, bringing 40k+ requests down to around 200.

Blackgate
Harbinger Tryssa – Revenant