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
 

Pull mails from char. How?

First post
Author
Solecist Project
#1 - 2014-05-30 13:14:30 UTC
Hi!

I have no idea how this works. Tutorials indicate that the whole process
is more of a mess than anything else and nowhere I really get to understand
how to do what I want to do.

Now besides me thinking that XML is rather bloated with too much text
and thinking that this whole API data retrieval is a mess ...


All I want to do is have my code pull mails from a char
and an easy explanation on how to do it.

No need for anything else at all.

So if you can offer some step by step pseudocode about
what to send where and how to retrieve the data,
then 100 Million ISK will be yours for the taking,
assuming I can implement it successfully.

Which won't be such a big deal.


Please understand that besides my opposition to how things work,
I am not too lazy to put myself into this,
but simply not willing to dig through all this for one little thing I need.

Hence the payment.


Thanks!

That ringing in your ears you're experiencing right now is the last gasping breathe of a dying inner ear as it got thoroughly PULVERISED by the point roaring over your head at supersonic speeds. - Tippia

CCP FoxFour
C C P
C C P Alliance
#2 - 2014-05-30 13:59:36 UTC
There are a few ways to go about this, some of which depends on what language you are using. While a yes a mess the API is pretty easy once you get a grasp of it, it's even easier if you use an existing library.

First you will need an API key for the character that gives access to Mail Bodies and Mail Messages I believe are the two required access masks.

If you are using Python I highly recommend using the evelink library found here: https://github.com/eve-val/evelink

If you do that you should be able to simply do the following:

============================
# Imports
import evelink.api
import evelink.char

# Setup API and Character objects
api = evelink.api.API(api_key=(keyID, vCode))
char = evelinke.char.Char(char_id=charID, api=api)

# Print mail headers
print char.messages
=============================

Each mail header should contain an ID, use that ID to get the message body with:

char.message_bodies(message_ids='comma,delimited,string,of,ids'))

You may have to double check how the evelink API works for list of ids, I think it's comma delimited string but I could be wrong.

If you are using PHP check out phealng: https://github.com/3rdpartyeve/phealng

I don't know PHP though so /shrug

I am in the process of putting together some better documentation, it's still very new but you can check it out here: https://wiki.eveonline.com/en/wiki/Third_Party_Developers

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Solecist Project
#3 - 2014-05-30 14:04:58 UTC
Thanks for your reply.

As stated above, I'm not using phyton.
I'm using an actually compiled language.

Your code doesn't really tell me anything
or give me any insights, sorry.

That ringing in your ears you're experiencing right now is the last gasping breathe of a dying inner ear as it got thoroughly PULVERISED by the point roaring over your head at supersonic speeds. - Tippia

Manhim
Garoun Investment Bank
Gallente Federation
#4 - 2014-05-30 14:08:15 UTC
What language are you using?
Solecist Project
#5 - 2014-05-30 14:09:18 UTC
To clarify again.

All I want is to know what to send where and how to directly access and pull the data I need.

Libraries are nice and all, but hide the few lines of code I actually care about...
... unless the API is really such a huge mess that it's not possible to get what I want without a huge effort behind it?

Or would you rather suggest wasting ours going through the phyton code for that one thing I need?

That ringing in your ears you're experiencing right now is the last gasping breathe of a dying inner ear as it got thoroughly PULVERISED by the point roaring over your head at supersonic speeds. - Tippia

Yongtau Naskingar
Yongtau Naskingar Corporation
#6 - 2014-05-30 14:14:50 UTC
Solecist Project wrote:
To clarify again.

All I want is to know what to send where and how to directly access and pull the data I need.

Libraries are nice and all, but hide the few lines of code I actually care about...
... unless the API is really such a huge mess that it's not possible to get what I want without a huge effort behind it?

Or would you rather suggest wasting ours going through the phyton code for that one thing I need?


1) Get an API key that gives access to the API
2) Do 1 HTTP GET request on https://api.eveonline.com/char/MailMessages.xml.aspx with the API key as parameter for the headers
2) Do 1 HTTP GET request per mail on https://api.eveonline.com/char/MailBodies.xml.aspx

For more detailed info see http://wiki.eve-id.net/APIv2_Char_MailMessages_XML and http://wiki.eve-id.net/APIv2_Char_MailBodies_XML
Solecist Project
#7 - 2014-05-30 14:19:40 UTC  |  Edited by: Solecist Project
Thanks Yongtau for your post.

It says that I can only retrive new mails every half hour?

Is this accurate?!


Is there anything that I can pull from a char that doesn't force me into waiting for new things?

Half an hour waiting time is not acceptable for what I need.

That ringing in your ears you're experiencing right now is the last gasping breathe of a dying inner ear as it got thoroughly PULVERISED by the point roaring over your head at supersonic speeds. - Tippia

Yongtau Naskingar
Yongtau Naskingar Corporation
#8 - 2014-05-30 14:25:01 UTC
Solecist Project wrote:
It says that I can only retrive new mails every half hour?

Is this accurate?!

Most API things aren't really useful for real time things, I tried to do something with contracts some time and that had a 'once per hour' limit at the time too.
Solecist Project
#9 - 2014-05-30 14:32:17 UTC
Yongtau Naskingar wrote:
Solecist Project wrote:
It says that I can only retrive new mails every half hour?

Is this accurate?!

Most API things aren't really useful for real time things, I tried to do something with contracts some time and that had a 'once per hour' limit at the time too.

Crap. Crapcrapcrap.

I'll send you 20Mill for the proper response above though.

That ringing in your ears you're experiencing right now is the last gasping breathe of a dying inner ear as it got thoroughly PULVERISED by the point roaring over your head at supersonic speeds. - Tippia

CCP FoxFour
C C P
C C P Alliance
#10 - 2014-05-30 14:43:54 UTC
Solecist Project wrote:
Yongtau Naskingar wrote:
Solecist Project wrote:
It says that I can only retrive new mails every half hour?

Is this accurate?!

Most API things aren't really useful for real time things, I tried to do something with contracts some time and that had a 'once per hour' limit at the time too.

Crap. Crapcrapcrap.

I'll send you 20Mill for the proper response above though.


May I ask what you are trying to achieve?

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Solecist Project
#11 - 2014-05-30 14:53:18 UTC
CCP FoxFour wrote:
Solecist Project wrote:
Yongtau Naskingar wrote:
Solecist Project wrote:
It says that I can only retrive new mails every half hour?

Is this accurate?!

Most API things aren't really useful for real time things, I tried to do something with contracts some time and that had a 'once per hour' limit at the time too.

Crap. Crapcrapcrap.

I'll send you 20Mill for the proper response above though.


May I ask what you are trying to achieve?

Sure!

Is there a more private way I can tell you?

This is EVE... I rather not share it in public,
but you seem trustworthy... xD

That ringing in your ears you're experiencing right now is the last gasping breathe of a dying inner ear as it got thoroughly PULVERISED by the point roaring over your head at supersonic speeds. - Tippia

CCP FoxFour
C C P
C C P Alliance
#12 - 2014-05-30 16:20:28 UTC
Solecist Project wrote:
CCP FoxFour wrote:
Solecist Project wrote:
Yongtau Naskingar wrote:
Solecist Project wrote:
It says that I can only retrive new mails every half hour?

Is this accurate?!

Most API things aren't really useful for real time things, I tried to do something with contracts some time and that had a 'once per hour' limit at the time too.

Crap. Crapcrapcrap.

I'll send you 20Mill for the proper response above though.


May I ask what you are trying to achieve?

Sure!

Is there a more private way I can tell you?

This is EVE... I rather not share it in public,
but you seem trustworthy... xD


EVE mail works fine. :)

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Hel O'Ween
Men On A Mission
#13 - 2014-06-01 09:57:27 UTC
Yongtau Naskingar wrote:

2) Do 1 HTTP GET request on https://api.eveonline.com/char/MailMessages.xml.aspx with the API key as parameter for the headers
2) Do 1 HTTP GET request per mail on https://api.eveonline.com/char/MailBodies.xml.aspx


[Slightly OT]

Not sure if that's still the case, but "once upon a time, in the void beginning of the API", the recommended way of accessing the API was HTTP POST. While GET did/does work, it was meant for manual testing (i.e. am I providing the right parameters) ... or so, I was told.

EVEWalletAware - an offline wallet manager.

CCP FoxFour
C C P
C C P Alliance
#14 - 2014-06-01 10:01:47 UTC
Hel O'Ween wrote:
Yongtau Naskingar wrote:

2) Do 1 HTTP GET request on https://api.eveonline.com/char/MailMessages.xml.aspx with the API key as parameter for the headers
2) Do 1 HTTP GET request per mail on https://api.eveonline.com/char/MailBodies.xml.aspx


[Slightly OT]

Not sure if that's still the case, but "once upon a time, in the void beginning of the API", the recommended way of accessing the API was HTTP POST. While GET did/does work, it was meant for manual testing (i.e. am I providing the right parameters) ... or so, I was told.


There are a few people say this, I really need to track down why that is. We have better logging on our end for GET so I would prefer you guys use GET. I will ask around on Monday and see if I can track down where this came from.

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Dragonaire
Here there be Dragons
#15 - 2014-06-01 14:13:27 UTC
Probably came from the fact that even on a https connection as I understand it people can still see the GET params because they are in the clear just to be read by anyone vs having to look into the body of the packet to see POST. It may only be true on the initial connection and not true if connection reused in http(s) 1.1 but most people aren't reusing their connection soon enough not to time out or in other ways drop the connection between API requests. I do remember some kind of request or suggestion several years back by someone at CCP to use POST but not sure the reason etc. Hope that helps you figure it out. I know personally that I find POST easier to use as a programmer as well so that's why Yapeal has used it from the start.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Sentenced 1989
#16 - 2014-06-08 17:29:56 UTC
Maybe this would help?

Explains how to deal with CREST and PHP, but you get the point of how it works and could possibly look at it as pseudo code for your project: http://youtu.be/mPwg4-lwQpg
Solecist Project
#17 - 2014-06-08 17:36:18 UTC
Sentenced 1989 wrote:
Maybe this would help?

Explains how to deal with CREST and PHP, but you get the point of how it works and could possibly look at it as pseudo code for your project: http://youtu.be/mPwg4-lwQpg

I maybe should have updated this thread.

On the way I've found out that there are heavy restrictions regarding pulling mails,
which make it unpractical to use.

Thank you though, I'll check out your link. (:

That ringing in your ears you're experiencing right now is the last gasping breathe of a dying inner ear as it got thoroughly PULVERISED by the point roaring over your head at supersonic speeds. - Tippia

Alt Two
Caldari Capital Construction Inc.
#18 - 2014-06-08 18:54:10 UTC
Speaking of mail.. Are we allowed to programmatically access EVE gate to send and/or receive mails?
ItsmeHcK1
Immortalis Inc.
Shadow Cartel
#19 - 2014-06-09 22:06:18 UTC
I don't know how they would ever prove that it wasn't a browser making the request...
Solecist Project
#20 - 2014-06-09 22:17:00 UTC
Alt Two wrote:
Speaking of mail.. Are we allowed to programmatically access EVE gate to send and/or receive mails?
That's actually how I will approach this, as using the API is a bit too pointless for my taste.

That ringing in your ears you're experiencing right now is the last gasping breathe of a dying inner ear as it got thoroughly PULVERISED by the point roaring over your head at supersonic speeds. - Tippia

12Next page