These are chat archives for arenanet/api-cdi

9th
May 2017
Darqam
@Darqam
May 09 2017 00:12 UTC

So, even if two items share the same icon, the API saves the as different files? I was hoping to get some sort of duplicate icon notification, but it seems that's not possible?

See: https://api.guildwars2.com/v2/items/77346
and: https://api.guildwars2.com/v2/items/77341

so without the use of some fancy image recognition software, not possible to find duplicate icons?

Archomeda
@Archomeda
May 09 2017 00:13 UTC
the API gets the images directly from the .dat (like most stuff), if the .dat references the same file, the API uses the same file too
at least that's how i think it works
Darqam
@Darqam
May 09 2017 00:14 UTC
if it were the case then the icon should be the same url though
Archomeda
@Archomeda
May 09 2017 00:14 UTC
the items you linked have different icons though
Darqam
@Darqam
May 09 2017 00:14 UTC
wait...
sob...
Archomeda
@Archomeda
May 09 2017 00:15 UTC
shield vs staff :P
are those actually different icons
really gitter you're not gonna inline those
Darqam
@Darqam
May 09 2017 00:15 UTC
nevermind
I had a case of the dumbs
oh dang i was too late
Darqam
@Darqam
May 09 2017 00:15 UTC
and opened the wrong api item page
Great news though, I can find duplicate icons. Future me will be a happy person
IIRC the hash bit is an HMAC of the image's data
Archomeda
@Archomeda
May 09 2017 00:16 UTC
hehe
and the number.png is the id of the image (which may vary)
if the image data is the same the HMAC should be the same
Darqam
@Darqam
May 09 2017 00:16 UTC
cool, thanks for the extra info
(I might be wrong about that -- the HMAC might include the id; I don't recall)
no probs
@Archomeda what is this magic
did you ![link](it)
Archomeda
@Archomeda
May 09 2017 00:17 UTC
simple markdown formatting: ![](https://render.guildwars2.com/file/9FEAEA4FD3E85238044F03583929B25A5BCCC420/1302324.png)
yeah okay
fair
Archomeda
@Archomeda
May 09 2017 00:17 UTC
(had to look it up though :D)
<img src="https://render.guildwars2.com/file/9FEAEA4FD3E85238044F03583929B25A5BCCC420/1302324.png" width="32">
pff, not even html
windwarrior
@windwarrior
May 09 2017 08:00 UTC
that makes sense right
otherwise I would <script> stealAllYourCookies(); </script>
also, like I have said multiple times, markdown libraries are usually extremely vulnerable to XSS
Archomeda
@Archomeda
May 09 2017 10:51 UTC
no, you can filter that stuff out really
windwarrior
@windwarrior
May 09 2017 10:57 UTC
well theoretically yeah
but practically, I have yet to find a markdown library that does that without creating XSS leaks
you can inject javascript in so many ways
eh, I've used http://htmlpurifier.org/ in the past and it's worked pretty well
Darqam
@Darqam
May 09 2017 18:59 UTC
looking purely at the info in the API, is there a way to know if a ring has been only attuned, or only infused aside from looking at the name? The details->infusion_slots seems to only be a "count" of available slots.
Archomeda
@Archomeda
May 09 2017 19:18 UTC
Eh... Item id? I think infused vs attuned rings are completely different items
But, unsure if there are flags
Darqam
@Darqam
May 09 2017 19:23 UTC
yeah they are, but I meant given an api entry, can you determine if the item is either infused or attuned, without having to pull apart the name looking for those keywords?
ChieftainAlex
@ChieftainAlex
May 09 2017 20:24 UTC
isn't the id for one always > the other?
self answer: nope.
you can reference the mystic forge recipe to guess unattuned/attuned pairs
that's literally the only link and the API doesn't expose 'em, so
the mystic forge JSON thing that someone maintains might have them on it though
Darqam
@Darqam
May 09 2017 20:29 UTC
the api pulls mystic forge recipes from the wiki though, right?
either way, I think I'll just solve this through looking at the name, it's not pretty but at least (so far) the names have consistently had Atunned and (Infused) when relevant
I never actually hooked the mystic forge bits up to the API, but they were going to use the semantic search on the wiki yeah
Darqam
@Darqam
May 09 2017 20:33 UTC
ah yeah, well the point of what I'm making is to add things to the wiki, so it wouldn't pull anything that I want from that anyway :p
Darqam
@Darqam
May 09 2017 20:41 UTC
hmmmm, do I preemptively make a check for if trinkets are legendary or not... Lye? Any hints if this is worth while?
literally no idea
Darqam
@Darqam
May 09 2017 20:41 UTC
awwwww
i didn't even know there was a new home node until someone pointed out it wasn't on the API
speaking of which, I should deploy the fix for that
ugh I don't wanna do a deploy today
Archomeda
@Archomeda
May 09 2017 20:45 UTC
what? saving it for friday? :D
seems like a good plan
Archomeda
@Archomeda
May 09 2017 20:46 UTC
just warn us whenever there's something new available or if something has changed :smile:
have to update the changelog then
I don't think I've got anything until the next release
The next release looks like this: https://github.com/arenanet/api-cdi/milestone/1
Hopefully using milestones will make it easier to keep track of everything.
Archomeda
@Archomeda
May 09 2017 20:47 UTC
:+1:
Darqam
@Darqam
May 09 2017 20:49 UTC
#507 looks pretty huge
Archomeda
@Archomeda
May 09 2017 20:50 UTC
yay for tracking daily changing vendors when it's done :D
@Darqam it's going to be ... interesting
Darqam
@Darqam
May 09 2017 20:50 UTC
pretty much, I can already imagine website to alert you whenever an item goes on sale
Archomeda
@Archomeda
May 09 2017 20:50 UTC
^ i'd love that
Darqam
@Darqam
May 09 2017 20:50 UTC
Yeah, i can imagine Lye. Courage to you
I already have a script which auto-posts to reddit
need to milk the karma
Archomeda
@Archomeda
May 09 2017 20:51 UTC
lol
taking it straight to the bank and y'all coppers will never catch me
Darqam
@Darqam
May 09 2017 20:51 UTC
PSA <item name> is now available in PSNA merchants, price was <query TP price>
I don't know how many times I've seen those
Michael Dougall
@madou
May 09 2017 23:05 UTC
anyone have the asset for the background behind completed achievements
I don't
Darqam
@Darqam
May 09 2017 23:09 UTC
I think I recall seeing those a while back, I'll look around
Michael Dougall
@madou
May 09 2017 23:18 UTC
awesome, thanks
lye almost got shareable achievements, just trying to make it pretty for you :ok_hand: :ok_hand:
:heart:
Quaggan BooOOoot
@QuagganBooOOoot
May 09 2017 23:25 UTC
:heart:
Darqam
@Darqam
May 09 2017 23:25 UTC
damn, not having luck. They're not in the 512x128 as I expected nor in similar sizes
Darqam
@Darqam
May 09 2017 23:31 UTC
@madou http://imgur.com/a/4XvD4 maybe?
it's all I could find for the backgrounds, the shape matches, but brightness seems off
come to think of it, I don't think that's right at all, nvm
it might be the art for the incomplete ones
Archomeda
@Archomeda
May 09 2017 23:37 UTC
it seems like some of the brightness is determined programmatically and changes every reload
and tbh, those backgrounds look differently than ingame
it seems ingame just has a gradient
with some fixed star
and a layer of a white circle with different opacities
Michael Dougall
@madou
May 09 2017 23:39 UTC
Yeah
Need to find the starrrr
Archomeda
@Archomeda
May 09 2017 23:40 UTC
ah
Michael Dougall
@madou
May 09 2017 23:40 UTC
Basically I'm looking for the assets behind the achievement icon when it has been completed
Thanks for trying darqam
Archomeda
@Archomeda
May 09 2017 23:40 UTC
i guess it might be 128x128?
or maybe even 256x256
Michael Dougall
@madou
May 09 2017 23:41 UTC
No idea, do you guys just fish through the dat to find these?
Archomeda
@Archomeda
May 09 2017 23:42 UTC
yeah
export all the images to a folder, and search there looking at the thumbnails :P
although the star might be hard to spot if it's white + transparent
Michael Dougall
@madou
May 09 2017 23:43 UTC
Hmm I should do that
😃🤔🤔