These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
12Next page
 

Learning to use the EvE API...

Author
Teasel
Serenity Logistics Corporation
#1 - 2013-04-19 09:23:58 UTC
I have been going through Trenker's very helpful API tutorials on his site (great work btw Smile ). I can pull information from the dump and display it but as i'm a bit of a noob to all this, i was wondering if there's any info out there about displaying the related icons to the database items in a page (i.e. having the picture of a deimos appear next to the ship data). I have looked for the info and googled it endlessly and am getting fed up (and a little demoralized tbh) with hitting dead ends and seemingly irrelevant info (like i said, i am a bit of a noob to this so the info may be useful but i can't 'see the wood for the trees' at the moment). Any pointers, code snippets or links would be most helpful and really appreciated.

Many thanks in advance :)
KnifeOrSpoon
Contraposition Industries Inc
#2 - 2013-04-19 10:09:03 UTC
I'm unsure if you are using PHP and MySQL so the example I am going to give assumes you are doing so....

The minimum SQL data you will require is the typeID column, and referencing the Eve-ID API Reference page there is this link for calling images

http://imagetest.eveonline.com/Render/29990_512.png

Just substitute the 29990 with the typeID you have retrieved from the database.
Teasel
Serenity Logistics Corporation
#3 - 2013-04-19 10:15:14 UTC
yp, i'm using php and mysql. Thanks for the example Smile, i'm looking more for how to code that into the output. I can retrieve the data using sql query in php, but how to code in displaying the image?
Teasel
Serenity Logistics Corporation
#4 - 2013-04-19 12:48:02 UTC
...anyone? Straight
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#5 - 2013-04-19 13:44:16 UTC  |  Edited by: Steve Ronuken
just stick an image tag into your output, using the typeid of the thing.

< img src="http://image.eveonline.com/InventoryType/< ? echo $row->typeid; ?>_64.png">

Obviously, remove the spaces after the < or it'll not work (that's the forums for you.)


If you want some code to poke through, have a look at
https://github.com/fuzzysteve/eve-blueprint-calc
It's got some stuff in it (memcache mostly) which makes a bit more complicated, but if you're just reading it, it's not that tricky. If you'd like a simpler sample, I can put one together.





http://image.eveonline.com/ explains what images are available.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

KnifeOrSpoon
Contraposition Industries Inc
#6 - 2013-04-19 22:48:29 UTC
Steve Ronuken wrote:

http://image.eveonline.com/ explains what images are available.


I was unaware of this resource... thank you very much for that Big smile
Teasel
Serenity Logistics Corporation
#7 - 2013-04-20 23:50:31 UTC  |  Edited by: Teasel
Steve Ronuken wrote:
just stick an image tag into your output, using the typeid of the thing.

< img src="http://image.eveonline.com/InventoryType/< ? echo $row->typeid; ?>_64.png">

Obviously, remove the spaces after the < or it'll not work (that's the forums for you.)


If you want some code to poke through, have a look at
https://github.com/fuzzysteve/eve-blueprint-calc
It's got some stuff in it (memcache mostly) which makes a bit more complicated, but if you're just reading it, it's not that tricky. If you'd like a simpler sample, I can put one together.





http://image.eveonline.com/ explains what images are available.


Thanks for the info and the help Smile

I've started getting the kind of results i'm looking for now from the database dump, however i'm now getting these kinds of image results:

"res:/Texture/Landmark/{image}.jpg"*

...on some queries. Is there anywhere locally on my machine they are retrieveable from or not? I have the database dump plus all the image files that go with it but i can't seem to find this group of images at all What?
-Any pointers (even if it's 'nope, can't get at them images') Would be most appreciated...

*Substitute {image} for any given image name in that category
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#8 - 2013-04-21 00:28:09 UTC
That I don't know for sure. I suspect it'll be a resource in one of the files in the Eve Client, which is stuff I've never touched. Goes a bit beyond 'display an image for a type'.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Tonto Auri
Vhero' Multipurpose Corp
#9 - 2013-04-21 00:37:28 UTC
If you provide a specific query, that yield these or similar results, I might be able to help you with figuring that out.

Two most common elements in the universe are hydrogen and stupidity. -- Harlan Ellison

Teasel
Serenity Logistics Corporation
#10 - 2013-04-21 00:47:10 UTC
Steve Ronuken wrote:
That I don't know for sure. I suspect it'll be a resource in one of the files in the Eve Client, which is stuff I've never touched. Goes a bit beyond 'display an image for a type'.

I was suspecting the same thing tbh, thanks for the heads-up :)
Teasel
Serenity Logistics Corporation
#11 - 2013-04-21 00:51:35 UTC
Tonto Auri wrote:
If you provide a specific query, that yield these or similar results, I might be able to help you with figuring that out.

If you look in the 'maplandmarks' table and follow an entry's 'iconID' link, the entry you are taken to in the 'eveicons' table invariably has "res:/Texture/Landmark/{image}.jpg" as it's image path... Similar story with some other tables/items and so forth...
Tonto Auri
Vhero' Multipurpose Corp
#12 - 2013-04-21 01:06:43 UTC
Steve was right. You can find them in resDX9Textures.stuff.
resLocalization.stuff and resStaticData.stuff are (presumably) contain the texts of the landmarks and other associated data.

$ .info\dec-stuff.php l resDX9Textures.stuff | grep -i Landmark
3511 res\texture\landmark\a33colonialruins.jpg
4399 res\texture\landmark\amarr.jpg
4113 res\texture\landmark\caldari.jpg
4835 res\texture\landmark\cityofgod.jpg
4319 res\texture\landmark\curse.jpg
5532 res\texture\landmark\emperor.jpg
4586 res\texture\landmark\galente.jpg
4789 res\texture\landmark\ginnungagap.jpg
4037 res\texture\landmark\golgothanfields.jpg
3287 res\texture\landmark\jove.jpg
3762 res\texture\landmark\khanidkingdom.jpg
4797 res\texture\landmark\minmatar.jpg
4974 res\texture\landmark\myridianstrip.jpg
3274 res\texture\landmark\outerring.jpg
4371 res\texture\landmark\pointofnoreturn.jpg
3783 res\texture\landmark\serpentscoil.jpg
4659 res\texture\landmark\stain.jpg
4139 res\texture\landmark\thesyndicate.jpg
3856 res\texture\landmark\traumark.jpg
3858 res\texture\landmark\venal.jpg

Two most common elements in the universe are hydrogen and stupidity. -- Harlan Ellison

Teasel
Serenity Logistics Corporation
#13 - 2013-04-24 00:31:46 UTC
Tonto Auri wrote:
Steve was right. You can find them in resDX9Textures.stuff.
resLocalization.stuff and resStaticData.stuff are (presumably) contain the texts of the landmarks and other associated data.

$ .info\dec-stuff.php l resDX9Textures.stuff | grep -i Landmark
3511 res\texture\landmark\a33colonialruins.jpg
4399 res\texture\landmark\amarr.jpg
4113 res\texture\landmark\caldari.jpg
4835 res\texture\landmark\cityofgod.jpg
4319 res\texture\landmark\curse.jpg
5532 res\texture\landmark\emperor.jpg
4586 res\texture\landmark\galente.jpg
4789 res\texture\landmark\ginnungagap.jpg
4037 res\texture\landmark\golgothanfields.jpg
3287 res\texture\landmark\jove.jpg
3762 res\texture\landmark\khanidkingdom.jpg
4797 res\texture\landmark\minmatar.jpg
4974 res\texture\landmark\myridianstrip.jpg
3274 res\texture\landmark\outerring.jpg
4371 res\texture\landmark\pointofnoreturn.jpg
3783 res\texture\landmark\serpentscoil.jpg
4659 res\texture\landmark\stain.jpg
4139 res\texture\landmark\thesyndicate.jpg
3856 res\texture\landmark\traumark.jpg
3858 res\texture\landmark\venal.jpg


Thanks for confirming that :)

Although this next issue is to do with the DB dump, i don't want to start another thread... I've been trying to get a query where i list the stars and constellations in a region. I can query one or the other, but when i try to combine the two queries (and i have tried many ways) it fails in some way -either with an error or returning no rows. The two queries i have adapted from an existing example query in the eve id.net wiki. Here they are:

Display Systems:
SELECT solarSystemName AS systems
FROM mapSolarSystems
INNER JOIN mapRegions ON mapSolarSystems.regionID=mapRegions.regionID AND mapRegions.regionName='Essence';

and

Display Constellations:
SELECT constellationName AS constellation
FROM mapconstellations
INNER JOIN mapRegions ON mapconstellations.regionID=mapRegions.regionID AND mapRegions.regionName='Essence';

I am really newbish to this but i am learning loads as i go along, i have just hit a bit of a wall with this -probably another case of not seeing the wood for the trees. If anyone can give me a pointer as to how i merge the two queries together, that would be of enormous help, thx :)
Tonto Auri
Vhero' Multipurpose Corp
#14 - 2013-04-24 00:36:51 UTC
That's because you're doing it wrong.
You want mapDenormalize :)
Or better - clearly indicate your final aim, because not necessarily you DO WANT to fetch ALL of this data from DB.

Two most common elements in the universe are hydrogen and stupidity. -- Harlan Ellison

Teasel
Serenity Logistics Corporation
#15 - 2013-04-24 16:45:36 UTC
Tonto Auri wrote:
That's because you're doing it wrong.
You want mapDenormalize :)
Or better - clearly indicate your final aim, because not necessarily you DO WANT to fetch ALL of this data from DB.

My final aim is to be able to retrieve a list of solar systems in a given region by constellation to allow me to then keep track of inspace corp assets by adding them in from a website. Since i am in the middle of learning php and mysql i'm looking to do this with these technologies. I may need to refine my explanation further but that's the basic gist Big smile
Tonto Auri
Vhero' Multipurpose Corp
#16 - 2013-04-24 20:36:45 UTC
"by constellation" is an irrelevant clarification. It doesn't do anything by and of itself.

Two most common elements in the universe are hydrogen and stupidity. -- Harlan Ellison

Teasel
Serenity Logistics Corporation
#17 - 2013-04-24 20:43:59 UTC
ok, so even if i don't include that in the search as it's irrelevant, i'd still like the facility to have the constellation listed so if necessary the results can be grouped by that category -if you see what i mean...
Tonto Auri
Vhero' Multipurpose Corp
#18 - 2013-04-24 20:50:40 UTC
I don't see a reason to group anything by an irrelevant criteria.

Two most common elements in the universe are hydrogen and stupidity. -- Harlan Ellison

Teasel
Serenity Logistics Corporation
#19 - 2013-04-24 21:42:13 UTC
Fair enough, but i do. Although i appreciate your insights (and the pointer to mapdenormalize was a huge help Smile ), i'd like to know whether it's possible, not whether you feel it is relevant for me to be doing... If it's not at all possible, then fair enough but if it is...
Tonto Auri
Vhero' Multipurpose Corp
#20 - 2013-04-24 21:47:30 UTC
It is, of course, possible. But please understand my point: I've seen enough programs dying from a bunch of useless, but often requested features.
What purpose grouping by constellation would serve? Make it grouped by constellation? Now, what? What can you do on constellation level? There's a system, the station, the region... But constellation - ? What meaning it has?

Two most common elements in the universe are hydrogen and stupidity. -- Harlan Ellison

12Next page