Harbinger Tryssa – Revenant
Showing Posts For Eearslya.6309:
Harbinger Tryssa – Revenant
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).
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
(edited by 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.
Harbinger Tryssa – Revenant
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.)
Harbinger Tryssa – Revenant
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!
Harbinger Tryssa – Revenant
It’s been requested, and it might become a feature someday, but at the moment, no.
Harbinger Tryssa – Revenant
-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.
Harbinger Tryssa – Revenant
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?
Harbinger Tryssa – Revenant
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…
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
Last time someone asked about this, I believe Lawton clarified it was Glory, which is obviously no longer in use in the game.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
Nope, though it’s been discussed a few times here. It’ll find its way into the API at some point, I’m sure.
Harbinger Tryssa – Revenant
The WvW test client will not log in to regular servers. That’s the whole reason they have a seperate client.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
I’ve also updated the wiki page so hopefully this confusion can be avoided in the future.
Harbinger Tryssa – Revenant
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
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
Seems like accounts with 9+ (<256 slots) bank tabs are affected. Can anyone confirm?
Yeah, I have 9 bank tabs exactly (in-game).
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
/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.
Harbinger Tryssa – Revenant
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?
Harbinger Tryssa – Revenant
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?
Harbinger Tryssa – Revenant
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.)
Harbinger Tryssa – Revenant
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?
Harbinger Tryssa – Revenant
(edited by 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?
Harbinger Tryssa – Revenant
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
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
Is there any update on this issue? I’ve just come across it myself while trying to find the Wintersday ornament items.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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.
Harbinger Tryssa – Revenant
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:
- 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- 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
Harbinger Tryssa – Revenant
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!
Harbinger Tryssa – Revenant
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.)
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.
Harbinger Tryssa – Revenant