Pages: 1 2 3 4 5 6 7 8 9 10 [11] 12 .. 12 :: one page |
|
Author |
Thread Statistics | Show CCP posts - 9 post(s) |
Raquel Smith
Caldari Freedom-Technologies
|
Posted - 2007.07.22 10:43:00 -
[301]
Edited by: Raquel Smith on 22/07/2007 10:42:51 I wrote a Ruby library to interface with the API. Still early days but it seems to work for me. :)
Personally I'd love to see services to eliminate the need for SQL dumps at all. Agent data, solarsytem data and so forth. It could be fun and would make keeping our copies of the database from going stale a week after a dump.
(edit: botched url)
|
Ray McCormack
hirr
|
Posted - 2007.07.22 10:51:00 -
[302]
Originally by: Raquel Smith I wrote a Ruby library to interface with the API. Still early days but it seems to work for me.
Ruby is nice, I wouldn't mind getting stuck into it. Any idea when the SVN will be up?
| Researched BS BPOs | BMBE ISK Loans | |
Raquel Smith
Caldari Freedom-Technologies
|
Posted - 2007.07.22 15:05:00 -
[303]
Edited by: Raquel Smith on 22/07/2007 15:10:28
Originally by: Ray McCormack
Originally by: Raquel Smith I wrote a Ruby library to interface with the API. Still early days but it seems to work for me.
Ruby is nice, I wouldn't mind getting stuck into it. Any idea when the SVN will be up?
It's up now! Dreamhost replied to my ticket in 4 hours (not bad considering I filed it 2am local time to them).
svn co http://svn.crudvision.com/reve
Look at tester.rb for a basic usage.
Edit: Docs up at http://docs.crudvision.com/reve/
|
Eight Ace
|
Posted - 2007.07.23 11:37:00 -
[304]
Howdy.
More idiot questions from your's truly.
I have been attempting to get the corp wallet information back from the API, thankfully I have managed to achieve this.
What I have been banging my head against a wall for the last five hours with is trying to get that data to actually display on a webpage.
The output I am getting from the PHP file that calls the API is :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <link href="css/xml.xsl" rel="stylesheet" type="text/css" /> </head> <body>
<?xml-stylesheet type="text/xsl" href="ed.xsl"?><?xml version='1.0' encoding='UTF-8'?><eveapi version="1"><currentTime>2007-07-23 11:30:25</currentTime><result><rowset name="accounts" key="accountID" columns="accountID,accountKey,balance"><row accountID="3187958" accountKey="1000" balance="114535293.49" /><row accountID="13333986" accountKey="1001" balance="12568.06" /><row accountID="13333987" accountKey="1002" balance="0.00" /><row accountID="13333988" accountKey="1003" balance="0.00" /><row accountID="13333989" accountKey="1004" balance="50366611.82" /><row accountID="13333990" accountKey="1005" balance="0.00" /><row accountID="13333991" accountKey="1006" balance="518907934.66" /></rowset></result><cachedUntil>2007-07-23 11:45:25</cachedUntil></eveapi><br/> </body> </html>
What I see on the screen is :
2007-07-23 11:30:252007-07-23 11:45:25
Some discrepancy there I think you will agree.
Anyhow, could any of you programmer types please explain, in words of one syllable, how I get the XML data to display.
Please bear in mind that I first encountered XML at 10:30 this morning. Since then I have read, admittedly briefly some hundred or so webpages that claimed to explain how to get this data to be visible on the screen. None have thus far suceeded in explaining this in a way that an absolute novice, someone with no concept of HTML, XML or indeed any programming language can understand.
What I know so far is that XML is data and not presentation and some form of presentation description needs to be linked to the XML data in order to display it. That is probably the CSS / XSL file. beyond that I know nothing.
Any help much appreciated.
-8-
|
Grismar
Gallente The Establishment Establishment
|
Posted - 2007.07.23 13:55:00 -
[305]
Originally by: Eight Ace <snip a lot of XML> What I see on the screen is : 2007-07-23 11:30:252007-07-23 11:45:25 Some discrepancy there I think you will agree.
Actually, no. If you look carefully, the only pieces of text that are not the value of some attribute or an element name are those times. So, it's makes sense.
Originally by: Eight Ace Anyhow, could any of you programmer types please explain, in words of one syllable, how I get the XML data to display.
Well, the XML isn't intended for immediate display. It's an API. Application Programmer's Interface. And not a very nice playing one at that... Unless you plan to program an application, the interface will be pretty much useless to you. If you merely want to be able to access some ingame information out of game, you will either have to delve a little deeper into the intricacies of saving and handling the XML or get someone to do it for you, I'm afraid. (I'm booked though the end of the year)
Greetings, Grismar.
Your EVE IGB home: EVE Wiki, Explorer, Navigator |
Eight Ace
|
Posted - 2007.07.23 15:09:00 -
[306]
Thanks for the reply.
I have made some progress in the meantime, I now have:
fputs($fp, $head); fputs($fp, $auth); $count = 1; while (!feof($fp)) { //$data = fgets($fp); //skip the first five lines while ($count < 10) { $data = fgets($fp); $data = ""; $count ++; } $data = fgets($fp); } //echo $data;
function print_error() { global $parser; die(sprintf("XML Error: %s at line %d", xml_error_string($xml_get_error_code($parser)), xml_get_current_line_number($parser) )); } //create xml parser object $parser = xml_parser_create(); xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1); xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); xml_parse_into_struct($parser,$data,&$d_ar,&$i_ar) or print_error(); //view content of $d_ar and $i_ar echo '<pre>'; print_r($d_ar); print_r($i_ar); //print $d_ar; //print $a_ar; //print $d_ar[4]; //echo $d_ar[2];
//unseting XML parser object xml_parser_free($parser); ?>
Which is returning a human readable version of the arrays containing the data I want, trying to get this into a nice neat format and get the individual values will be my next problem to tackle :)
-8-
|
Ray McCormack
hirr
|
Posted - 2007.07.23 22:05:00 -
[307]
Originally by: Eight Ace Is the intention of the /corp/WalletJournal.csv.aspx page that it's pumped into a database on my server if I want to query it or store it for others to reference or will the server happily dish this information out to other clients?
Yes. No.
What are you trying to achieve? If you want the data, just save the XML straight from your Character sheet (link over on the left there).
If you're looking to save the data on a webpage your best bet is to stick it into a database and then query that yourself. I'll be releasing an Open Source Offline Wallet later in the week that does this for you.
You are not meant to access the API everytime you want to view the information, it's meant to be stored over a period of time in your own database (or similar).
| Thanatos BPO ME1 Auction | BMBE ISK Loans | |
Hiro Yuki
Minmatar Re-Awakened Technologies Inc
|
Posted - 2007.07.23 23:38:00 -
[308]
Is there a way of getting standings? All I can see in character sheet is the character sheet and skill in training.
I've decided to try and make a website using API, but I'm new to using API's, so expect newbie questions!
|
Hiro Yuki
Minmatar Re-Awakened Technologies Inc
|
Posted - 2007.07.23 23:52:00 -
[309]
Just found the wiki. Fantastic site, thanks folks who made it! Adding my request for standings export! Also, adding request for current location export.
|
Hiro Yuki
Minmatar Re-Awakened Technologies Inc
|
Posted - 2007.07.24 14:57:00 -
[310]
How about Assets? Evemon has the ability to tell you whether you own a skillbook or not, and so it totals up the amount it will cost you to learn a whole plan. How does it do that?
|
|
Eight Ace
|
Posted - 2007.07.24 18:52:00 -
[311]
With this journal data we have in the API it would be nice to have some view of things like "best ratter" who got the most officer spawns, who's contributed the most in the way of taxes over the course of a month, that kind of thing, how many named officers we have whacked this week etc.
So this data needs to be pumped into a database, the ( highest / lowest ) refID needs to be stored so next time we call the API we only get the new data...
Wait a sec.... doesn't the beforeRefID parameter only allow walking backwards through the data - is there a parameter that will allow us to say 'only give us data that comes AFTER this refID' ??
|
Prime Ori
|
Posted - 2007.07.25 08:14:00 -
[312]
I build my Trade tool last night but missed an important thing to make it more usefull:
Buy and sell order export for re-supply info. Now I have to import it manually from every eve character inside the client enviroment which is a b**h
Thanx!
|
Irongut
M'8'S Frontal Impact
|
Posted - 2007.07.25 13:39:00 -
[313]
Edited by: Irongut on 25/07/2007 13:40:26 Edited by: Irongut on 25/07/2007 13:39:31
Originally by: Hiro Yuki
Just found the wiki. Fantastic site, thanks folks who made it!
Great! Any chance of letting those of us who don't know about it in on the url?
I've got the methods from the docs working and the two undocumented ones listed in this thread but I think there should be another...
Originally by: Patch Notes Build 32517 to 33752
Character(s) on your account, Current data on character skill training, Character skill sheet, including trained skills, implants, etc., The EVE skill tree, including all published skills, descriptions, training modifiers and times, etc., Corporation information (corporation details, members, base, date of join, etc., Wallet balance (corporation & personal, including divisions), Wallet journal log (corporation & personal, including divisions), Market transaction log (corporation & personal, including divisions), and Solar system sovereignty.
I can't find a method that returns corp info. Yes, I have the one that lists members but the patch notes seem to imply results more like a corp info window. Does this exist?
My software never has bugs. It just develops random features.
|
Confuzer
PBA Corporation The Volition Cult
|
Posted - 2007.07.25 18:38:00 -
[314]
Seriously, in the wallet export it only has a station name :S How dumb is that... they change alot in 0.0!
StationID please... ----------------- Destiny is not a matter of chance. It is a matter of choice. It's not a thing to be waited for - it is a thing to be achieved. |
Hiro Yuki
Minmatar Re-Awakened Technologies Inc
|
Posted - 2007.07.26 12:00:00 -
[315]
Originally by: Irongut
Great! Any chance of letting those of us who don't know about it in on the url?
Sorry!
http://wiki.eve-dev.net/Main_Page
It's in an early comment on this page.
|
Maccha Mochi
Gallente Center for Advanced Studies
|
Posted - 2007.07.26 22:23:00 -
[316]
Edited by: Maccha Mochi on 26/07/2007 22:23:32 self snip
|
Yokan Daifuku
Gallente The Flaming Sideburn's Hedonistic Imperative
|
Posted - 2007.07.26 22:25:00 -
[317]
I would like to announce the start of an Schema for the api. Since this is a topic of its own I've started another thread. Let me know what you think, remember its just a start. ---- Yo-con Die-foo-koo |
Jalf
|
Posted - 2007.07.26 22:35:00 -
[318]
Just a very simple suggestion. When you get errors like this one: <error code="101">Wallet exhausted: retry after 2007-07-26 22:34:07.</error> How about putting the timestamp in its own tag? Would be nice if I could get the "retry after" time through XML operations only, without having to do string parsing as well. Could just be something like the following: <error code="101">Wallet exhausted: retry after <time>2007-07-26 22:34:07</time></error>
|
Jalf
|
Posted - 2007.07.26 22:55:00 -
[319]
Edited by: Jalf on 26/07/2007 23:01:20 Edited by: Jalf on 26/07/2007 22:56:26
Originally by: Eight Ace
Anyhow, could any of you programmer types please explain, in words of one syllable, how I get the XML data to display.
The simple solution is to output *nothing else* but the XML to the browser (no html/head/body tags or anything else. Just the plain XML document). Then it'll show it as an xml document, which is better than nothing. (by the way, I made a very simple html version grabbing market transactions here: http://spoonbender.5elements.net/evemarket.html There's no php or anything on the backend, it's just a static html page. Very quick & dirty, but it works :D And it outputs the returned xml directly to the browser, without using a XSLT or anything like that, so that should give you an idea of how that looks, at least.
I can see you tried to use XSLT to format the xml data, which is the way I'd go as well. However, to do that, your XML has to be formatted correctly. In particular, it shouldn't contain html (the XSLT stylesheet is responsible for adding that), and it should start with the stylesheet inclusion (or the <?xml> tag)
Make the document start with these two lines (no doctyles, no html tags before this, not even spaces or other whitespace.) <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="ed.xsl"?> <eveapi version="1"> ... bla bla, rest of the xml doc here ...
(note that the ?xml tag, if it exists, must be the *first* in the document. And the ?xml-stylesheet tag must come after)
I can't see your xsl file, so can't tell if that is correct. But you'll want to put all the html you want to generate inside that file. As you say, XML is data, XSL handles the presentation. And what are the html tags, if not presentation?
And just to clarify on the difference between CSS and XSL stylesheets. CSS stylesheets just tweak how specific HTML tags should be rendered. It doesn't transform the HTML itself. It can't, say, create a <div> here, and repeat the <hr> there three times. It can only take the given HTML tags, and format them.
XSL on the other hand can only transform. From XML to... whatever you like. Usually you want to transform to HTML, but it can do other things as well. XSL doesn't specify how, say, a div tag should be rendered. It just takes the XML data, and generates a HTML document around it. (That html document can use CSS properties and classes just like a regular HTML document.) The XSL file can say "whenever we encounter a row tag inside a rowset tag in the XML, we should take the "balance" attribute, and put it in a <div class="cssrow>", for example.
Oh, and the reason why none of your data was displayed is simple, and to do with HTML, not XML. HTML has two simple rules that cause it. First, a tag is some text enclosed in <>'s. Second, when the browser encounters an unknown tag, the specs say it should be ignored. So, what should it do when it runs into, say, an <?xml-stylesheet> tag in the middle of an html document? It's not a valid HTML tag, so it should be ignored. Same goes for <currentTime>, <rowset> and all the others. They're tags, but they're not valid HTML tags. So they get ignored.
You may want to play around with this XSLT tutorial a bit: http://www.w3schools.com/xsl/ It's the best one I've found so far.
|
Tonto Auri
|
Posted - 2007.07.28 16:48:00 -
[320]
Originally by: Jalf Could just be something like the following: <error code="101">Wallet exhausted: retry after <time>2007-07-26 22:34:07</time></error>
It already there. Any such thing should contain <cachedUntil>2007-06-18 23:42:00</cachedUntil> -- Thanks CCP for cu<end of sig> |
|
Zy'or Tealon
Caldari DarkStar 1 GoonSwarm
|
Posted - 2007.07.28 19:00:00 -
[321]
Will there be any way, or is there a way and did I miss it, to differentiate corporate transactions from personal transactions when retrieving the personal transactions?
Ingame the difference is visible through the color of the transactionDateTime. but the API doesn't make that difference afaik. This seriously messes up my personal market statistics :/
I tried to filter out the corp transactions using my log of the corp transaction downloads, but I'm missing some historical data which goes to far back. So that didn't work out.
Originally by: Clementina
If you bug report it, you get ignored. If you post about it on the forums, you get banned. If you exploit it, you get rich.
|
Jalf
|
Posted - 2007.07.29 18:38:00 -
[322]
Originally by: Tonto Auri
Originally by: Jalf Could just be something like the following: <error code="101">Wallet exhausted: retry after <time>2007-07-26 22:34:07</time></error>
It already there. Any such thing should contain <cachedUntil>2007-06-18 23:42:00</cachedUntil>
Ok, good point. :) But you only get that in the original result, not in the subsequent messages telling you to retry later. What I'm saying is that it'd be handy if I also had the time easily accessible in the "retry after" message.
Still, I'd forgotten that the original result had the cachedUntil field... :)
|
Tonto Auri
|
Posted - 2007.07.30 02:29:00 -
[323]
EVE API badly designed and have too many "issues" which ***** people heads each time they try to get it to real work. -- Thanks CCP for cu<end of sig> |
Tonto Auri
|
Posted - 2007.07.30 02:32:00 -
[324]
Eeerm.. does word "сraсk" mean something special why it filtered out? -- Thanks CCP for cu<end of sig> |
Opusent
IGA Trade Goods
|
Posted - 2007.07.30 15:04:00 -
[325]
For all the .NET developers, check out this thread for a new version of the Eve Toolbox, which contains an API interface as well as some examples and documentation
The Eve Toolbox Team
http://www.codeplex.com/evetoolbox |
Tekai Foo
German Kings OPUS Alliance
|
Posted - 2007.08.01 16:18:00 -
[326]
To what does the startDateTime in the MemberTracking refer? It's not the Character creation, but what is it?
|
Opusent
IGA Trade Goods
|
Posted - 2007.08.01 16:45:00 -
[327]
Originally by: Tekai Foo To what does the startDateTime in the MemberTracking refer? It's not the Character creation, but what is it?
I believe it's the date that the character joined the corporation
http://www.codeplex.com/evetoolbox |
Tekai Foo
German Kings OPUS Alliance
|
Posted - 2007.08.01 22:20:00 -
[328]
Originally by: Opusent
Originally by: Tekai Foo To what does the startDateTime in the MemberTracking refer? It's not the Character creation, but what is it?
I believe it's the date that the character joined the corporation
Ouch, yes, matches my join date.
|
Ix Forres
Vanguard Frontiers INVICTUS.
|
Posted - 2007.08.04 03:59:00 -
[329]
Edited by: Ix Forres on 04/08/2007 04:16:33 I knocked up a fairly flexible PHP5 class for working with the API- if anyone's interested it's here with it's (limited) documentation: http://wiki.eve-dev.net/API_PHP_Class
It's got a basic class for interacting with the API to return a SimpleXML object you can use to get data from the returned call- it's a simple key/id manager and simplification for developers. Means you can turn 20 lines of code into, say: $api = new apiinterface(); $api->setup("APIUSERID","APIKEY"); $ret = $api->apiRequest("account/Characters.xml.aspx"); // No array needed, will just provide basic authentication data. echo "Corporation Name: ".$ret->result->rowset->row[0]['corporationName'];
Edit: I intend to add to this and create a fairly full-featured interface from PHP to the API as time goes on- I'm cooking this up alongside a site I'm working on and will maintain them in parallel. Ix Forres
|
Nolana Kane
|
Posted - 2007.08.06 14:09:00 -
[330]
Originally by: Wardo21 Edited by: Wardo21 on 03/07/2007 20:02:59 Edit: on my second account, the character looks like he's done with training since the completion time has passed, but the <skillintraining> field is still "1".
<currentTime>2007-07-03 19:52:11</currentTime> <trainingEndTime>2007-07-03 15:58:21</trainingEndTime>
I had the same problem today: My training has finished this morning, still the XML claims that training is still underway. (Of course, looking at the actual timestamps reveals that currentTime > trainingEndTime.
Also one more voice for a proper DTD, XML Schema or Relax NG schema definition of the resulting XML. This would help creating parsers enormously, i.e. using a binding XML API I could have nice, tidy Java classes up in no time. For now, XSLT on the result will have to suffice.
|
|
|
|
|
Pages: 1 2 3 4 5 6 7 8 9 10 [11] 12 .. 12 :: one page |
First page | Previous page | Next page | Last page |