These are chat archives for arenanet/api-cdi

5th
Feb 2016
windwarrior
@windwarrior
Feb 05 2016 02:21
the best way to check whether a token makes sense is calling v2/tokeninfo I guess?
now to convince JQuery to respect my normal promises :'(
yeah, /v2/tokeninfo is likely what you want
windwarrior
@windwarrior
Feb 05 2016 05:05
Not sure if you guys like seeing tools I create, but todays monstrosity: http://windwarrior.github.io/GW2MaterialHeatmap/ , this thing makes an heatmap of your account bank so that you can see what you should sell if you are in dire need of money (blue is worthless, red is very valuable)
Pat Cavit
@tivac
Feb 05 2016 08:05
Neat!
Ryan Mast
@nightlark
Feb 05 2016 08:22
Ooh that is cool!
Ryan Mast
@nightlark
Feb 05 2016 08:28
I created what basically comes down to a MumbleLink to WebSocket bridge: http://nightlark.github.io/gw2ws/
Of course execution took a more complicated route and is not that user-friendly, though it does show that the performance impact of a bad, hastily done implementation of a WebSocket API isn't too much - at most maybe a drop from 50fps to 46fps.
Ryan Mast
@nightlark
Feb 05 2016 08:36
Erm, wrong link. Should be: https://github.com/nightlark/gw2ws
windwarrior
@windwarrior
Feb 05 2016 09:22
hmm, maybe You should embed this in a full application, not sure people understand that you have to run this daemon
Maybe like using a webview
smiley
@codemasher
Feb 05 2016 11:12
and there's the 3rd-party-application problem again
it's completely out of question if you'd ask me
i'm pretty sure, players tend to use overlay apps like overwolf or a webbrowser on a second monitor
and you really don't want to ask them to use your software, do you?
i mean, as 3rd party
we tried that almost 3 years ago and most reactions i got were out of distrust because people feared to be scammed (which is understandable)
Steven Liekens
@StevenLiekens
Feb 05 2016 11:33
If you open source it then people can see that your app is safe
metalfiiish
@metalfiiish
Feb 05 2016 11:36
Thanks for this api support. Was able to make teamspeak bot to authenticate gw2 users for access verification. Helps mitigate spies from other servers :smile:
smiley
@codemasher
Feb 05 2016 11:42
@StevenLiekens dude, what do you think we do all the time? and how many people do you expect to read AND understand your code?
Steven Liekens
@StevenLiekens
Feb 05 2016 12:05
Only a handful of people need to look at the code and declare it safe to use
smiley
@codemasher
Feb 05 2016 12:09
reality showed it's not that way
Archomeda
@Archomeda
Feb 05 2016 14:04
Heh, try telling that the API is safe to use to a guild mate of mine, he's afraid that the API will accidentally expose your whole account without asking you for permission, and even thinks your email address and password will be leaked at some point via the API
smiley
@codemasher
Feb 05 2016 14:04
yea, heard that before too - it is like it is.
windwarrior
@windwarrior
Feb 05 2016 14:04
yep, on reddit when keys were just a thing someone posted his key
Nabrok
@Nabrok
Feb 05 2016 14:04
Yeah, I had some of that when we first implemented API verification on the voice server.
windwarrior
@windwarrior
Feb 05 2016 14:05
and people were like, what are you doing, this is dangerous
Nabrok
@Nabrok
Feb 05 2016 14:05
Not actually as much as I expected, but still some.
smiley
@codemasher
Feb 05 2016 14:05
so if you want a successfull application, you better never ask others to install a 3rd party app
windwarrior
@windwarrior
Feb 05 2016 14:06
webapps are therefore very useful
Nabrok
@Nabrok
Feb 05 2016 14:06
And then we had to do it all over again when they got rid of OAuth2.
Archomeda
@Archomeda
Feb 05 2016 14:06
If you want to run a third party app along with your application, just run it along with it automatically :p
smiley
@codemasher
Feb 05 2016 14:07
yea, thats why i used overwolf in the end - because thats something people trust in
luckily there's meh's NPAPI plugin for the Mumble link. so all good :D
Archomeda
@Archomeda
Feb 05 2016 14:08
Myself, I would rather not use overwolf; not that I don't trust it, it's just that it crashed my game at some point, I hate how the overlay worked, and I had nothing to gain from it, other than being an annoyance
And I think I tried it 2 or 3 times already
smiley
@codemasher
Feb 05 2016 14:09
yea, the overlay is still a bit quirky but nontheless, they're doing a good job
Archomeda
@Archomeda
Feb 05 2016 14:11
@windwarrior, that heatmap is neat, but why is there so much scrolling involved on a 1080p display? xD
Edgar Doiron
@Coffee4cr
Feb 05 2016 14:17
@windwarrior what decides if it's worth selling?
windwarrior
@windwarrior
Feb 05 2016 14:26
It's currently more of a POC, it just accumulates TP data and calculates the value of that stack
I obviously have to tune some stuff
Archomeda
@Archomeda
Feb 05 2016 14:30
@Iye, how do you (or plan to) track the API usage? Via the User-Agent and/or Referer header, or just IP? (also, I still can't believe that someone made a typo back when it was invented... it throws me off so many times)
windwarrior
@windwarrior
Feb 05 2016 14:30
whahaha, google thinks that I am a robot
Nabrok
@Nabrok
Feb 05 2016 14:31
Are you sure that you aren't?
Archomeda
@Archomeda
Feb 05 2016 14:31
lol, had that happen a couple of times too :P
probably because my search terms were similar to the ones that bots use or something
windwarrior
@windwarrior
Feb 05 2016 14:32
I was googling referer :P, also I connected over IPv6
Archomeda
@Archomeda
Feb 05 2016 14:34
seems fine here :) although i don't even have ipv6
my modem has a wan duid, and a link-local ipv6 address, but no global ipv6 address, ipv6 gateway or any ipv6 dns :(
i blame ziggo :angry:
windwarrior
@windwarrior
Feb 05 2016 14:36
SURFnet offers IPv6 to university networks, I didnt get my own /64 tho :'(
Archomeda
@Archomeda
Feb 05 2016 14:37
:(
from what i've seen, ziggo doesn't even hand those out either
so if you're currently using port forwarding to access various devices from outside your LAN, well tough luck
even worse, if you are a new ziggo customer, you get ds-lite
windwarrior
@windwarrior
Feb 05 2016 14:42
XS4ALL gave me a /48 even
Archomeda
@Archomeda
Feb 05 2016 14:42
ipv6 are unique, but the ipv4 is private, just like how your LAN addresses work
you can't even connect to your own IP through IPv4 then
it's still funny though, i seem to remember that they said they would introduce IPv6 5 years ago or something
windwarrior
@windwarrior
Feb 05 2016 14:44
misunderstood your statement So ziggo is NATting for you?
Archomeda
@Archomeda
Feb 05 2016 14:45
if you are a new customer, yes, ziggo will use NAT for you for your IPv4 address
currently i only have an IPv4 and not even an IPv6 and i have a unique IPv4 address, so that's still fine
windwarrior
@windwarrior
Feb 05 2016 14:48
got 3 IPv4's and stateless autoconfigured IPv6 adresses
condensing the layout of the heatmap is not trivial btw :O
Archomeda
@Archomeda
Feb 05 2016 14:50
how so?
if you want to mimic the ingame mats storage layout, just set a max-width
i'll gladly take the extra whitespace left and right if it means i have to scroll less :D
windwarrior
@windwarrior
Feb 05 2016 14:52
well, the ingame thing is 10 items wide, so I want to respect that
so I thought to put multiple columns next to eachother
Archomeda
@Archomeda
Feb 05 2016 14:53
should be possible, unless you hit the issue with floats and mismatching div heights
windwarrior
@windwarrior
Feb 05 2016 14:54
its not floating, using inline-box, but that is proving to be an headace because it introduces a space after each div
CSS is not my favorite way to spend time
Archomeda
@Archomeda
Feb 05 2016 14:55
column-count is also very funny to work with: https://developer.mozilla.org/nl/docs/Web/CSS/column-count
i think it condenses stuff as much as possible
it's also top-bottom first, then left-right
instead of left-right -> top-bottom, like with floats
oh, i just noticed it supports auto as value... i have to try that to see how that works
windwarrior
@windwarrior
Feb 05 2016 15:00
condensed.PNG
Patrick Westerhoff
@poke
Feb 05 2016 15:00
@lye I might have a use case for proxies now.
Archomeda
@Archomeda
Feb 05 2016 15:01
hmm, that's a very interesting way to condense it :P but it does fit in one screen
btw, looking at that thumbnail, it looks like that someone messed up a tetris game
windwarrior
@windwarrior
Feb 05 2016 15:05
I wish I could somehow reorder the blocks, but that is all dynamically generated
Archomeda
@Archomeda
Feb 05 2016 15:20
section 46... makes you wonder where all the other sections went
also, 5 < 6, but 5 = food and 6 = ore stuff etc... food isn't above ore ingame
is this how the api spits it out, or do you use custom sorting?
windwarrior
@windwarrior
Feb 05 2016 15:22
how the api spits it out
Archomeda
@Archomeda
Feb 05 2016 15:23
i see
windwarrior
@windwarrior
Feb 05 2016 15:23
I have yet to retrieve the titles from the sections somewhere. I found a way yday, but it was late and well, 6am is a good time to go to bed :')
windwarrior
@windwarrior
Feb 05 2016 15:34
right, when using browserify.. you have to recompile your code
WHY IS MY CODE BRO... wait right

how do you (or plan to) track the API usage?

It'll be by IP address.

I might have a use case for proxies now.

@poke omg please tell. I think latest V8 stable has proxy support; going to start integrating that into our stack when I have some free time.

@windwarrior I made this for you arenanet/api-cdi#215
windwarrior
@windwarrior
Feb 05 2016 16:54
That is the order of the material tabs in the UI?
awesome
Again, totally oblivious as to how I missed that originally.
windwarrior
@windwarrior
Feb 05 2016 16:58
also, is there a reason that v2/account/materials returns a different format then v2/materials?
IIRC /v2/account/materials returns item stacks and is unlocalized, /v2/materials returns "collections" and is localized
Nabrok
@Nabrok
Feb 05 2016 17:09
@lye is name resolution on /v2/guild/:id/log for people no longer in the guild (i.e. on kicks) something that you will be able to add?
Yeah, but it's going to take a bit of refactoring.
windwarrior
@windwarrior
Feb 05 2016 18:58
Compacted layout + double click to disregard item are done: http://windwarrior.github.io/GW2MaterialHeatmap/ Here be bugs, also, now I have to refactor most of the thing to move on :').
Edgar Doiron
@Coffee4cr
Feb 05 2016 21:14
@Lye it's friday, what are you pushing live at 5pm? :)
@Coffee4cr nothing user-facing :>