These are chat archives for arenanet/api-cdi

16th
Jun 2016
dkettman
@dkettman
Jun 16 2016 00:20
Question: I read thru the ToS and other official documents but couldn't find anything about rate limiting my requests. Is there anywhere I can find this information? Thanks!
Currently, there's no rate limiting.
That said, almost everything is heavily cached -- please check either the Cache-Control or Expires headers to save yourself bandwidth.
(also I reserve the right to add rate limiting in the future if something starts falling over, but there haven't been any issues thus far)
dkettman
@dkettman
Jun 16 2016 00:23
What would you say is the best way to populate a base list of the items? I have something that pulls the list of item id's and then goes thru that list to get the details, but it stops and I get timeouts at random points.
Also, thanks for the quick reply!
Archomeda
@Archomeda
Jun 16 2016 00:23
Have you looked at bulk expansion?
I'd actually recommend pagination
e.g., /v2/items?page_size=0&page=N -- there's some headers (X-Page-Total i think?) that have the total number of pages
dkettman
@dkettman
Jun 16 2016 00:24
Well, I get my seed list no problem. The list of all item id's, it is when I go thru item by item and get the details.
David Reeß
@queicherius
Jun 16 2016 00:25
I usually use X-Result-Total when paginating
That'll take forever -- if you're planning on pulling all the items anyway, might as well skip /v2/items and use /v2/items?page=X
with ?page_size=200 it'll take two orders of magnitude fewer requests
dkettman
@dkettman
Jun 16 2016 00:25
I have noticed it will take a while :)
Archomeda
@Archomeda
Jun 16 2016 00:26
Of course, pagination... forgot about that one
you can do it in under a minute if you do multiple requests in parallel after the first one :>
dkettman
@dkettman
Jun 16 2016 00:26
I will note that while I have tons of fantastical ideas in my head, but getting them into code isnt always the most straight forward. More of a sys admin by trade rather than a dev ;)
ditto lol
dkettman
@dkettman
Jun 16 2016 00:28
Oh .. pagination... sweet sweet pagination! That is the key to my problems! Thanks!
Archomeda
@Archomeda
Jun 16 2016 00:30
But yeah, also for something in the future, if you only want a set of items by given ids, then you will definitely want to use bulk expansion, eg /v2/items?ids=123,456,789,1234,2345
dkettman
@dkettman
Jun 16 2016 00:31
Alright, I will keep that in mind.
Thanks for all the help!
Eearslya Sleiarion
@Eearslya
Jun 16 2016 00:32

you can do it in under a minute if you do multiple requests in parallel after the first one :>

Totally did it in 18 seconds once

(pls don't IP ban me for flooding)
i only play on charr, so i hope it will be changed
Archomeda
@Archomeda
Jun 16 2016 02:21
i wonder, if you put all the data that's available on the api into a database (not counting the live data and personal account data), how big would that database be?
basically data that's mostly static or changes when a new patch is out
David Reeß
@queicherius
Jun 16 2016 03:05
why is localization so hard... now that I finally found/built a workflow that uses gettext keys, can extract things from source code, can interpolate values (and elements), has instant reloads... its missing damn pluralization. why the heck do some languages have 6 damn plurals.
smiley
@codemasher
Jun 16 2016 09:22
@dkettman i don't know what language you're doing stuff in, but feel free to check this https://github.com/codemasher/gw2-database
windwarrior
@windwarrior
Jun 16 2016 12:44
@dkettman, example code for retrieving the entire v2/items endpoint https://gist.github.com/windwarrior/8686fe13a43972ab5df4a615a8233885
really, did you need to inline this gist
Archomeda
@Archomeda
Jun 16 2016 12:49
they really should add an option to not inline stuff right?
darthmaim
@darthmaim
Jun 16 2016 12:50
or limit it too 100px height or so
windwarrior
@windwarrior
Jun 16 2016 12:54
or like fade it halfway, and make it expandable
windwarrior
@windwarrior
Jun 16 2016 13:01
(this one takes... 3 minutes and 32 seconds to retrieve 54317 items... not too bad I guess)
I wanted to retrieve the structure of the item endpoint, like to see which keys are optional and such.. But I became stuck with theoretical problems
(and maybe find some inconsistencies)
Archomeda
@Archomeda
Jun 16 2016 14:49
okay... whoever is going to use such a font, please get out :)
https://twitter.com/laravelphp/status/737762024789184512/photo/1?ref_src=twsrc%5Etfw
smiley
@codemasher
Jun 16 2016 15:20
reasons why i don't take laravel seriously, pt. #312433541
dkettman
@dkettman
Jun 16 2016 15:52
Wow, that is really hard to read...
darthmaim
@darthmaim
Jun 16 2016 15:55
So many people on twitter are using that font...
Christian
@zeeZ
Jun 16 2016 17:02
Man I've always wanted a 200$ unreadable font for my IDE
Edgar Doiron
@Coffee4cr
Jun 16 2016 17:02
lol
smiley
@codemasher
Jun 16 2016 17:43
so i installed the win10 IoT core on my raspi
and it didn't detect the USB
and now i don't have a keyboard
cool stuff >.<
anyone here tried this before?
iLovePorkDumpling
@iLovePorkDumpling
Jun 16 2016 17:53
Hi! I have a question about GW2 API. Which API to call to get list of Daily Fractal of the Mists? I look at https://wiki.guildwars2.com/wiki/API:Main and not sure if I find any details about which API will return this data to me. Thanks in advance for any help
smiley
@codemasher
Jun 16 2016 17:56
the list of all endpoints is over here: https://api.guildwars2.com/v2
so this is perhaps what you're looking for https://api.guildwars2.com/v2/achievements/daily
iLovePorkDumpling
@iLovePorkDumpling
Jun 16 2016 18:00
@codemasher - Thanks a lot for the links. I am using https://api.guildwars2.com/v2/achievements/daily, but it only returns daily for PvE, PvP, WvW, and Special (which is like special event content like luna festival, etc.)... I do know that Daily FotM is returns in the the achievement API here -> https://api.guildwars2.com/v2/achievements But I don't know which ids are the ones which are the Daily FotM of the day
Any further advice?
smiley
@codemasher
Jun 16 2016 18:03
i haven't done anything achievement related yet, i'm only in for maps ;) might ask @darthmaim or @queicherius though.
windwarrior
@windwarrior
Jun 16 2016 18:05
@iLovePorkDumpling The Fractal dailies are their own category within the fractal group
they are not technically dailies
or... they don't look like it
which is the list of achievement from that category
(Hope that helps!)
iLovePorkDumpling
@iLovePorkDumpling
Jun 16 2016 18:08
@codemasher - Thanks a lot for some recommendations.
@windwarrior - Oooooo. Man, thank you very much. Let me research on that some more but I believe that's what I'm looking for. Thank you SO much. On the side note, how did you know that it's not a 'daily' to be found through the daily achievement api, but the '88' category?
windwarrior
@windwarrior
Jun 16 2016 18:08
well I made a fractal daily app thingie a while ago, and probably asked about the same thing here ;)
it is currently horribly broken I guess
If you wonder about a category of an achievement, you can just call https://api.guildwars2.com/v2/achievements/categories?ids=all . I have installed "JSONView" in my chrome so that I can easily navigate the JSON structure within my browser
also @lye Stronghold of the Faithful only lists 3 achievements
ingame it lists 10ish
iLovePorkDumpling
@iLovePorkDumpling
Jun 16 2016 18:12
I see. Very cool! Thank you a lot for your help! This is a pretty cool community... You know what I have one more question. Is lye an anet team member or he's a contributor where any one can contribute to the GW2 api? (I just thought may be something I can contribute to the community too)
windwarrior
@windwarrior
Jun 16 2016 18:12
he is from anet
iLovePorkDumpling
@iLovePorkDumpling
Jun 16 2016 18:13
ahh.. oh well :)
@windwarrior - thanks a ton!
windwarrior
@windwarrior
Jun 16 2016 18:13
no worries :> Like to help!
smiley
@codemasher
Jun 16 2016 19:26
wait, since when are gifs as profile images a thing on twitter? (again) https://pbs.twimg.com/profile_images/2088678303/Slime-Dad-small_bigger.gif
Christian
@zeeZ
Jun 16 2016 22:07
I have an animated image on g+, maybe twitter is preparing for the google buyout :P