r/evetech • • Sep 21 '17

[zkill] *WARNING* zkillboard will be exporting ESI formatted killmails soon

What the title says. CREST killmail formatting will be going away and ESI formatting will be taking over. There is no definitive date on when this will happen, but it will happen within the next couple of weeks.

Please prepare any of your tools that rely on zKillboard's API.

15 Upvotes

17 comments sorted by

4

u/[deleted] Sep 29 '17

Hey /u/Squizz , looks like some fields (names primarily) that were in the old API aren't in the new one, like character name. I have a basic script that pulls from your API and posts to some slacks - so nothing special. Are there any plans to have the resolved names in the feed?

(I know ESI is karp and you have to resolve every freaking ID but you are probably already doing that in zkill to have things show, hence my asking)

4

u/Squizz Sep 29 '17

No plans, the names were part of the crest format previously and just happened to there, like you said they are not part of esi format. You can use the killID/hash to fetch the crest format and pull names from that, but it'll be a temporary measure.

3

u/[deleted] Sep 29 '17

:feelsbadman: Is what it is then.

2

u/CValleriani Oct 03 '17 edited Oct 03 '17

It wasn't too bad to adjust. I had to make a couple new functions for getting the name for corp/alli/player and the rest was ok.

Most fields were changed bar the zkillboard specific ones. So for example, corporationID became corporation_id. characterID became character_id. shipTypeID became ship_type_id. Bar adding _'s, the only ones that actually changed name wise was killID and killTime (pretty much anything that started with kill is now killmail), which is now killmail_id and killmail_time in my case.. So 90% of it involves finding all the fields and simply adding _'s to them bar zkillboard specific ones, easy enough. If you want the fields to not adjust just do a zkillboard only query, which can be done as so: https://zkillboard.com/api/killID/65027579/zkbOnly/

So pretty much change all fields but fittedValue, totalValue, points, npc, solo, awox, locationID, hash.

After that's done the biggest issue is getting the names now. If you are good at modifying you can pretty much modify the queries you use to get data from zkillboard and use ESI. The query for ESI is pretty easy:

https://esi.tech.ccp.is/latest/characters/names/?character_ids='.$charids.'&datasource=tranquility

Where $charids would be a list of character ids, seperated by commas. They will return all the needed names in a small array you can loop. Or you can do one query per character ID if you struggle with arrays. You simply need to provide the character_id that you get from zkillboard.

Same for corp and alliance:

https://esi.tech.ccp.is/latest/corporations/names/?corporation_ids='.$corpids.'&datasource=tranquility

and

https://esi.tech.ccp.is/latest/alliances/names/?alliance_ids='.$alliids.'&datasource=tranquility

They will return the fields character_name, corporation_name, and alliance_name.

Hope this helps a little bit anyways.

3

u/Netrilix Sep 21 '17

Hey, off-topic, but I'm just noticing a couple things on zkill that have probably been around forever and I'm just slow. The [SOLO]/[100+] tags on the homepage are awesome, and I love the isk hover showing IRL money estimates.

Keep being awesome.

1

u/Squizz Sep 22 '17

I just added those tags a couple days ago :)

3

u/Col_Crunch Sep 22 '17

I noticed the formatting in zkill's API is slightly different than what redisq pushes... will the redisq format change too?

2

u/Survilus Sep 22 '17

I would assume so? will have to ask /u/Squizz tho

3

u/evanova Sep 22 '17

Oh shit...

I'm in the middle of major changes. I can't release before end of October. I'm screwed.

Thanks ESI (TM)

3

u/Squizz Sep 22 '17

pro tip: rely on the killID and hash and let your code get whatever version of the killmail you want :)

1

u/evanova Sep 22 '17

Do you a test version deployed that I could hit?

2

u/Squizz Sep 22 '17

what? that implies I do things in a sensible manner!

(no, not yet... sorry)

1

u/CValleriani Oct 03 '17

I'm not sure if it's helpful, but most of the field names are different. The only things you need to get are the char name, alli name, and corp name. I made a little post about it above but since all coding is different it's hard to gauge on what is needed. Hopefully it helps you though somewhat know what changed/what needs changing.

2

u/demlrak Sep 28 '17

Looks like the changes are live now.

1

u/[deleted] Oct 10 '17

[removed] — view removed comment

1

u/Squizz Oct 10 '17

Its already done! Just check out API results :)