Pages: [1] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Merii Kha'sen
Amarr Metal Machine
|
Posted - 2008.12.22 19:25:00 -
[1]
Hi all,
I'm not sure if I'm just doing this wrong or if I actually can't get the previous data.
Here's what I'm doing (right now just in the browser, as I haven't written the class to handle caching yet)
http://api.eve-online.com/corp/killlog.xml.aspx?userid=1234&apikey=ABCD&characterid=5678&beforeKillID=0
This returns kills fine. I now want to get my previous kills (establishing a history in a database before I continue).
Last kill:
<row killID="2889676" [stuff]> [snip] </row> </rowset> </result> <cachedUntil>2008-12-22 20:12:12</cachedUntil> </eveapi>
As I understand it, I need to pass in &beforeKillID=(string)killRows.Last().Attribute("killID").Value (that is, the last killID in the XML) and it will return another 100 kills for me to play with.
http://api.eve-online.com/corp/killlog.xml.aspx?userid=1234&apikey=ABCD&characterid=5678&beforeKillID=2889676
<eveapi version="2"> <currentTime>2008-12-22 19:12:32</currentTime> <error code="119">Kills exhausted: retry after 2008-12-22 20:12:12.</error> <cachedUntil>2008-12-22 20:12:12</cachedUntil> </eveapi>
WTF?
Additionally, waiting 1 hour, then passing in the old killID returns this:
Expected beforeKillID = 0: wallet not previously loaded.
Any ideas what I'm doing wrong here? I couldn't find any terribly useful docs on the subject.
Regards, Merii |
Dragonaire
Caldari Corax.
|
Posted - 2008.12.22 21:23:00 -
[2]
The API will only return more kills if they are less then a week old so you'll need to compare the current data/time with the killTime from last kill returned and only if it's less then a week can you walk back for more kills. You can get a better understand of how it works by looking at the section on Journal Walking in the JournalEntries page at EVE-Dev.
For a code example of how I did it in PHP take a look in either /inc/pulls-corp.inc or inc/pulls-char.inc at the WalletJournal or WalletTransactions part. Might give you some idea on how to do it in what ever language you're using. -- Finds camping stations from the inside much easier. Designer of Yapeal for Eve API. |
Merii Kha'sen
Amarr Metal Machine
|
Posted - 2008.12.22 22:37:00 -
[3]
Edited by: Merii Kha''sen on 22/12/2008 22:38:24
Originally by: Dragonaire The API will only return more kills if they are less then a week old so you'll need to compare the current data/time with the killTime from last kill returned and only if it's less then a week can you walk back for more kills. You can get a better understand of how it works by looking at the section on Journal Walking in the JournalEntries page at EVE-Dev.
For a code example of how I did it in PHP take a look in either /inc/pulls-corp.inc or inc/pulls-char.inc at the WalletJournal or WalletTransactions part. Might give you some idea on how to do it in what ever language you're using.
So there's no way to get a complete history of all your corp kills? The oldest kill returned by the API is dated 2008-06-29, so yeah, it's a little over a week old.
I'd manually grab them from my corp's history, but my DB schema needs the killID. I can think of a way to get around it though - just generate a fake killID based on date/time. It's kind of dirty though. I order by date, so a "wrong" killid isn't an issue.
Thanks for the help!
|
|
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |