Pages: [1] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Bender Bending
Jarlhettur's Drop
0
|
Posted - 2017.03.01 20:47:01 -
[1] - Quote
This took me over 24 hours to create, mainly because I'm still learning but also because I suck at scripting. Anyway, I don't know who else will need this but a google search revealed the same question the forums a few times.
Plain text: http://pastebin.com/gRT9KbGB
JSON: http://pastebin.com/p2HhbbSa
Enjoy |
salacious necrosis
Garoun Investment Bank Gallente Federation
28
|
Posted - 2017.03.02 01:01:27 -
[2] - Quote
Bender Bending wrote:This took me over 24 hours to create, mainly because I'm still learning but also because I suck at scripting. Anyway, I don't know who else will need this but a google search revealed the same question the forums a few times. Plain text: http://pastebin.com/gRT9KbGB JSON: http://pastebin.com/p2HhbbSa Enjoy
Isn't this just metaGroupID = 5 in the SDE? If so, this should get you the list of type IDs (on Linux):
curl -s -X GET --header 'Accept: application/json' 'https://evekit-sde.orbital.enterprises/20170216/api/ws/v20170216/inv/meta_type?contid=-1&maxresults=1000&metaGroupID=%7B%20values%3A%20%5B5%5D%20%7D'
If you use jq you can extract just the type IDs with something like this:
curl -s -X GET --header 'Accept: application/json' 'https://evekit-sde.orbital.enterprises/20170216/api/ws/v20170216/inv/meta_type?contid=-1&maxresults=1000&metaGroupID=%7B%20values%3A%20%5B5%5D%20%7D' | jq '.[] | .typeID'
I count 539 mods which seems to be more than in your list.
Here's a fancy one liner to get the list in your format on Linux:
curl -s -X GET --header 'Accept: application/json' 'https://evekit-sde.orbital.enterprises/20170216/api/ws/v20170216/inv/type?contid=-1&maxresults=1000&typeID=%7B%20values%3A%20%5B'$(curl -s -X GET --header 'Accept: application/json' 'https://evekit-sde.orbital.enterprises/20170216/api/ws/v20170216/inv/meta_type?contid=-1&maxresults=1000&metaGroupID=%7B%20values%3A%20%5B5%5D%20%7D' | jq '.[] | .typeID' | awk '{printf $1"," }' | sed -e 's/,$//g')'%5D%20%7D' | jq '.[] | .typeName, .typeID' | awk 'NR%2{printf "%s, ",$0;next;}1'
Use
EveKit ! - Tools for EVE Online 3rd party development
|
salacious necrosis
Garoun Investment Bank Gallente Federation
28
|
Posted - 2017.03.02 01:06:59 -
[3] - Quote
Oops, actually my one-liner only gets the first 500. So here's a fancy two liner instead:
curl -s -X GET --header 'Accept: application/json' 'https://evekit-sde.orbital.enterprises/20170216/api/ws/v20170216/inv/type?contid=-1&maxresults=1000&typeID=%7B%20values%3A%20%5B'$(curl -s -X GET --header 'Accept: application/json' 'https://evekit-sde.orbital.enterprises/20170216/api/ws/v20170216/inv/meta_type?contid=-1&maxresults=1000&metaGroupID=%7B%20values%3A%20%5B5%5D%20%7D' | jq '.[] | .typeID' | head -n 200 | awk '{printf $1"," }' | sed -e 's/,$//g')'%5D%20%7D' | jq '.[] | .typeName, .typeID' | awk 'NR%2{printf "%s, ",$0;next;}1'
curl -s -X GET --header 'Accept: application/json' 'https://evekit-sde.orbital.enterprises/20170216/api/ws/v20170216/inv/type?contid=-1&maxresults=1000&typeID=%7B%20values%3A%20%5B'$(curl -s -X GET --header 'Accept: application/json' 'https://evekit-sde.orbital.enterprises/20170216/api/ws/v20170216/inv/meta_type?contid=-1&maxresults=1000&metaGroupID=%7B%20values%3A%20%5B5%5D%20%7D' | jq '.[] | .typeID' | tail -n +200 | awk '{printf $1"," }' | sed -e 's/,$//g')'%5D%20%7D' | jq '.[] | .typeName, .typeID' | awk 'NR%2{printf "%s, ",$0;next;}1'
Use
EveKit ! - Tools for EVE Online 3rd party development
|
Bender Bending
Jarlhettur's Drop
0
|
Posted - 2017.03.02 02:40:11 -
[4] - Quote
Thanks for the advice, I am fairly new to 3rd party application dev.
I am in uni for software and i needed practice with my foreach loops, heres the script i wrote in PHP:
foreach ($officermodList as $key => $value) { foreach ($allmodList as $key2 => $value2) { if (strcmp($value['typeName'], $value2['typeName']) == 0){ echo $value['typeName'] . ", " . $value2['typeID']; } } }
Where $officermodList is a json formatted list of all the officer modules i could copy and paste from the market browser, and $allmodList is a json formatted list of every typeID and typeName in the game. |
Althalus Stenory
Flying Blacksmiths
110
|
Posted - 2017.03.02 07:12:51 -
[5] - Quote
Bender Bending wrote:
foreach ($officermodList as $key => $value) { foreach ($allmodList as $key2 => $value2) { if (strcmp($value['typeName'], $value2['typeName']) == 0){ echo $value['typeName'] . ", " . $value2['typeID']; } } }
Since you never use "$key" and $"key2" you could also write :
foreach ($officermodList as $value) { foreach ($allmodList as $value2) { if (strcmp($value['typeName'], $value2['typeName']) == 0){ echo $value['typeName'] . ", " . $value2['typeID']; } } }
EsiPy - Python 2.7 / 3.3+ Swagger Client based on pyswagger for ESI
|
Bender Bending
Jarlhettur's Drop
0
|
Posted - 2017.03.02 17:32:38 -
[6] - Quote
Thanks! |
|
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |