These are chat archives for arenanet/api-cdi

4th
Oct 2017
Archomeda
@Archomeda
Oct 04 2017 00:20
image.png
where's our BL :warning: logo? D:
yeah something's wrong with the CSS
I got someone on it tomorrow
Archomeda
@Archomeda
Oct 04 2017 00:21
also, is the gem store actually down?
since i now have that overlay perman- nvm
not technically, though everything's still pretty backed up
Archomeda
@Archomeda
Oct 04 2017 00:22
yeah... nvm that overlay was there for a minute before the gem store was actually interactable :P
it's somewhat annoying that whenever the css breaks, the text is black :(
what did actually break with the tp?
Brandon Schmitt
@BrandonSchmitt
Oct 04 2017 00:26
Hi guys, I'm looking for an item search by name. I hoped the official api would support this but it doesn't. :( I have found two community hosted apis providing an item search but they are limited to English. Is there a reason it isn't included in the api? I even haven't found a pull request for it.^^
Eearslya Sleiarion
@Eearslya
Oct 04 2017 01:33
It's pretty much one of those feature's we've all accepted isn't going to be in the API; the way the official API reads the data just isn't efficient enough to do searches like that
You're better off making your own DB and querying that
David Reeß
@queicherius
Oct 04 2017 01:54
@BrandonSchmitt You can use gw2efficiencies autocomplete (partial match) or items/by-name (full match) APIs - just dont spam em
(The output format is slightly different than the official API)
Brandon Schmitt
@BrandonSchmitt
Oct 04 2017 02:00
@queicherius Thank you very much. That works for me. :)
Eearslya Sleiarion
@Eearslya
Oct 04 2017 02:39
or that
smiley
@codemasher
Oct 04 2017 02:41
also, there's still this http://gw2wbot.darthmaim.de/smiley/ (which uses the gw2treasures database)
(or more the other way around xD)
Michael Dougall
@madou
Oct 04 2017 07:26
anyone interested in common gw2 reactjs components? currently ripping out all the common stuff so the embeds an be their own thing instead of being tightly coupled with the armory, examples here: https://madou.github.io/armory-component-ui/index.html
work in progress.
Vilkatis
@vilkatis
Oct 04 2017 12:40
Hi, I'm new here. Regarding that search by name, if I make my own DB, I would have to write a script that crawls the api and writes in all in my db
So the logic would be, go to https://api.guildwars2.com/v2/items , get all item ids, split them in chunks and call https://api.guildwars2.com/v2/items/ids=[arrayOfIDs]
Question is, how often can i call the api with a chunk of ids, and how many ids at once can I query
Enno G.
@SchoolGuy
Oct 04 2017 12:42
Question is if @lye says that this “DDOS“-Attack is ok because you need to look for updatet values so you would need to do this eg once a week. (At least thats what I planned for my app)
Vilkatis
@vilkatis
Oct 04 2017 12:45
Well what I plan to do after I have a database, is compare the array at https://api.guildwars2.com/v2/items with the array of ID's I'll have in my database, and if there are any new ones, then add them to my database
So I just need an answer for how many ID's i can query at once, and at what interval
windwarrior
@windwarrior
Oct 04 2017 13:28
it is easier to use paging, you can call https://api.guildwars2.com/v2/items?page=0&page_size=200 to get the first 200 items of the API
each of these calls will then in headers tell how much results are left
Vilkatis
@vilkatis
Oct 04 2017 13:29
@windwarrior and at what interval is it ok to call it?
windwarrior
@windwarrior
Oct 04 2017 13:30
you are not hitting the rate limit when just crawling /v2/items
Vilkatis
@vilkatis
Oct 04 2017 13:31
So i can just go page after page and it's ok ? Thanks!
windwarrior
@windwarrior
Oct 04 2017 13:32
I have a script that does this somewhere
but I dont know where, maybe on my desktop
Eearslya Sleiarion
@Eearslya
Oct 04 2017 13:33
I've written a program that pulls all 200+ pages of /v2/items in 19 seconds
The rate limit is rather forgiving
Vilkatis
@vilkatis
Oct 04 2017 13:33
Can you share it? Would really appreaciate that
Eearslya Sleiarion
@Eearslya
Oct 04 2017 13:34
...that is a good question
but I am pretty sure that I crawled /v2/items the other day
Eearslya Sleiarion
@Eearslya
Oct 04 2017 13:35
It's in C, though, so I'm not sure how useful it is for you
Vilkatis
@vilkatis
Oct 04 2017 13:37
I can use what @windwarrior sent, thank you very much !
windwarrior
@windwarrior
Oct 04 2017 13:39
I am pretty sure that I have a full /v2/item downloader somewhere, I remember finding it funny that its only 15MB or so
somewhere however, is currently lost
Eearslya Sleiarion
@Eearslya
Oct 04 2017 13:39
I found mine, but it's missing a lib
smiley
@codemasher
Oct 04 2017 13:40
@vilkatis you might want to have a look at this https://github.com/codemasher/gw2-database/
Eearslya Sleiarion
@Eearslya
Oct 04 2017 13:43
My old C directory has about 5 different GW2 API crawlers that I kept scrapping and rewriting
smiley
@codemasher
Oct 04 2017 13:44
heh
Vilkatis
@vilkatis
Oct 04 2017 13:45
@smiley thanks I will
Archomeda
@Archomeda
Oct 04 2017 16:03

wow, completely offtopic, but this is actually funny, BREIN has succeeded in forcing our ISPs to block the pirate bay in NL, again

but... little do they know that tpb actually uses cloudflare, and you can just set a different cloudflare ip in your hosts file
plus, BREIN actually uses cloudflare themselves too, so... have fun blocking your own ip then :P

smiley
@codemasher
Oct 04 2017 17:53
turns out prototype.js & EC6 is pretty slick
Darqam
@Darqam
Oct 04 2017 18:56
Is there a chance of us seeing decoration type/category in the API at some point? They seem to be sorted in IG UI, but I don't think the API reflects that
Does the sorting IG make any sense?
I suspect they're just sorted by pointer address
(which is fixed based on how they're packed out in the .dat file)
Darqam
@Darqam
Oct 04 2017 18:57
like it's sorted as "architecture", "furniture", etc
ah
Darqam
@Darqam
Oct 04 2017 18:57
I think there's a "plants" section, "lighting", whatever else
Ah I see a "tags" field in content that's not exposed
The tag doesn't actually have a string
But I can just put in .tags : [42, 56, 99]
Darqam
@Darqam
Oct 04 2017 18:59
and then somewhere we'd have a string value for those tags?
you could hardcode string values :D
I'm not seeing string values on our end
Darqam
@Darqam
Oct 04 2017 18:59
hum ok, so I guess would just need a few examples to figure out numbers
shouldn't be too hard
hmm I guess I could hardcode a list
since I don't think the tags change that often
Darqam
@Darqam
Oct 04 2017 19:00
I don't think I've ever seen them change, just the one time architecture got added (I think it was that one)
Hmm, so there's content which defines "guild storage categories" -- each category has a string/tooltip and a list of tags
and with each tag in each category's list there's a string
Eearslya Sleiarion
@Eearslya
Oct 04 2017 19:02
and the rabbit hole gets deeper
hmm, with that (/v2/guild/upgrade/categories and .tags:[..] in upgrades) -- the tags would be GUIDs
might be better to have /v2/guild/upgrade/categories just contain a list of ids for the upgrades contained within
since upgrades are the only things with integer ids really
I kinda like that actually
Darqam
@Darqam
Oct 04 2017 19:04
so kind of like achievement/categories?
yep
was just gonna say "as an added bonus it mirrors achievements"
Darqam
@Darqam
Oct 04 2017 19:05
I'd be happy with that
windwarrior
@windwarrior
Oct 04 2017 20:36
I must admit that the script I was looking for is indeed gone
I might have saved it in /tmp
which, didnt survive the 2 months worth of reboots
smiley
@codemasher
Oct 04 2017 23:16
'http://www.sloganizer.net/en/outbound.php?slogan='.$item->name_en
:D
http://www.sloganizer.net/en/outbound.php?slogan=%3Cscript%3Ealert(%22hi%22)%3C/script%3E i broke it
smiley
@codemasher
Oct 04 2017 23:19
lye.
i just wanted to say hi ;_;
Eearslya Sleiarion
@Eearslya
Oct 04 2017 23:20
but it doesn't work
my dasterdly plans, foiled once again
oh apparently it's something on our end resetting the connection
Eearslya Sleiarion
@Eearslya
Oct 04 2017 23:27
wait what
smiley
@codemasher
Oct 04 2017 23:28
i see  every now and then
man IT got upset at me
smiley
@codemasher
Oct 04 2017 23:29
lmao
and it didn't even work
i'm disappointed
that's the last time I try XSS without HTTPS
smiley
@codemasher
Oct 04 2017 23:30
haha
(might add a strip_tags())
probably
Eearslya Sleiarion
@Eearslya
Oct 04 2017 23:32
wait what
I'm so confused
OH
you're saying an ANet firewall prevented you from trying it?
smiley
@codemasher
Oct 04 2017 23:34
Say it with Leftpaw's Impaler.
Make yourself at home with Leftpaw's Impaler.
Eearslya Sleiarion
@Eearslya
Oct 04 2017 23:35
Banana of Penetration