Reve is a Ruby API Library for the Eve Online API. Reve encapsulates all of the existing calls in a disgustingly large number of classes. RDoc is available with ChangeLog.
Reve supports Eve Online's API version 2 as of Release 42.
To check out and use the source use: svn co http://svn.crudvision.com/reve/trunk from commandline or put http://svn.crudvision.com/reve/trunk into something like TortoiseSVN to check the source out. Reve has a Trac to track development.
Or download the latest package (No subversion needed):
The library is free to use for non-commercial applications. Provide a link to this blog if you'd like to say thank you. If you'd like to submit a patch please post a comment to this page and let me know. Eventually I'll set up an email or mail list or something.
One gem are required:
why the lucky stiff's fabulous hpricot (gem install hpricot). Reve is known to work with Hpricot 0.6. If your gem version (find out with gem list hpricot) is below 0.6 update it with gem update hpricot.
Simply do: gem install hpricot on the commandline and these gems will be present.
Example of how to use the API:
-
require 'reve.rb'
-
-
api = Reve::API.new('my_UserID', 'my_apiKey')
-
-
api.alliances.each do |alliance|
-
-
puts "Got an alliance and its name is #{alliance.name}. Its short name is #{alliance.short_name} and its ID is #{alliance.id}."
-
-
end
After an API call the current time from the last request is available:
-
puts "Current time from server: #{api.current_time}"


Hi what exactly does this do?
Comment by Malcolm Harnden — July 22, 2007 @ 08:52
The library will allow Ruby developers to write programs and use this library as a means to abstract each API call. Instead of having to worry about formatting a POST/GET query string and sending it to CCP’s server the library will do it. The library also handles errors, like when there is a missing characterID or the wallet was loaded too soon and so on.
Comment by Lisa Seelye — July 22, 2007 @ 09:52
Good stuff, I’ll be using this.
Comment by Garik — July 30, 2007 @ 21:23
Thanks, now I don’t have to parse the output myself.
Comment by Jens Nockert — August 22, 2007 @ 18:04
Glad you like it Jens!
Comment by Lisa Seelye — August 22, 2007 @ 20:39
How about a –test flag or somesuch to dump the retrieved XML, try to update it every call but if it can’t be updated use the stored XML?
Comment by James Harrison — October 1, 2007 @ 23:38
Lisa, I’m planning on using it on a website that will have google advertisements, banner-ads and promotions of that sort, but the actual site functionality will be free (and open source). Does the Reve license prohibit this?
Thanks for making this lib… very cool!
Comment by Dirk Johnson — December 1, 2007 @ 09:14
Hey Dirk,
That’ll be OK but please place a link to http://www.crudvision.com/reve-ruby-eve-online-api-library/ on your site.
Good luck and thanks.
Comment by Lisa Seelye — December 1, 2007 @ 15:45
I am trying to return a character sheet, but i’m afraid I am doing it wrong.
char=Reve::Classes::CharacterSheet.new
char=api.character_sheet(characters.id)
characters.id is a fixnum id number
it says that it needs a hash and not a fixnum, what hash is it wanting?
Comment by Serphonis — January 2, 2008 @ 00:31
Hi Serphonis,
Try this:
char = api.character_sheet :characterid => characters.id
I’m in an effort to improve the documentation for Reve and an upcoming release and publication to the Reve RDoc site will be more useful.
Comment by Lisa Seelye — January 2, 2008 @ 00:59
Hi Lisa,
Thanks for your work on Reve. I’m using the software to work with corp finanicals but I am finding that changing the ‘account_key’ to switch from one corp wallet to another doesn’t seem to change the account from which data is taken.
So …
>> k = api.corporate_wallet_journal(:account_key => yyyy, :characterid => xxxxxxxxxxxxxx , :before_ref_id =>
>>zzzzzzzzzzz)
>>for i in 0 … k.length
>>bFile.puts “#{k[i].date},#{k[i].ref_id}, #{k[i].reftype_id} ,#{k[i].owner_name1}, #{k[i].owner_name2}, #{k[i].arg_name1} , #{k[i].amount} ,#{k[i].balance}, #{k[i].reason} end ”
>>end
extracts the data from master wallet for all values of yyyy from 1000 to 1007.
Any thoughts on why this may be?
kind regards,
Hawkwood
Comment by Hawkwood — January 14, 2008 @ 18:50
Hiya Hawkwood,
You might want to try using :accountkey => yyyy, :beforerefid => zzzzzzzzz. CCP is a fan of camelcase and they don’t use underscores.
And if I may impose:
“The Ruby Way” to deal with the collection returned from the API would be to use the each method:
k = api.corporate_wallet_journal(:accountkey => yyy, :characterid => xxx)
k.each |journal|
puts journal.date
puts journal.ref_id
end
and so on.
I can be found on Coldfront #eve-dev network if you or anyone else needs more assistance.
Comment by Lisa Seelye — January 14, 2008 @ 19:50
Running the example code above with reve_61 gives me the following error:
./lib/extensions.rb:92:in `to_time’: uninitialized constant Reve::Extensions::String::ParseDate (NameError)
from ./lib/classes.rb:22:in `initialize’
from ./reve.rb:138:in `new’
from ./reve.rb:138:in `alliances’
from ./reve.rb:137:in `each’
from ./reve.rb:137:in `alliances’
from skillupdate.rb:9
Comment by paul — January 23, 2008 @ 22:54
Hi Paul,
What version of Ruby are you using?
Comment by Lisa Seelye — January 23, 2008 @ 23:11
I’m using 1.8.6 that comes with OS X 10.5. Everything else that I’ve tried with reve has worked great.
BTW: Thanks for putting out such a killer set of classes. I can’t believe how much time it has saved me.
Comment by paul — January 24, 2008 @ 16:53
Thanks for the report Paul. If you have an IRC client you might want to find me on the #eve-dev channel on irc.coldfront.net and I could diagnose your system’s problem easier.
Can you run the test suite? (cd test && ruby reve_test.rb) and report any failures? I’m using OS X but my Macbook Pro came with Tiger and I installed ruby with MacPorts and then upgraded to Leopard. Everything runs successfully here, I’m afraid.
Comment by Lisa Seelye — January 24, 2008 @ 21:38
added a require ‘parsedate’ and all is well.
Comment by paul — January 24, 2008 @ 23:30
Strange, Paul, I’ll add that to the source just to make sure!
Comment by Lisa Seelye — January 24, 2008 @ 23:48
Hi, congrats on a great lib.
Could you please!!! also assemble a small tutorial for someone who wants to use your lib in a web app (like rails with activerecord)?
PS: You wouldn’t possible have already defined some classes for the db export, now would you? ^^
Comment by lmicra — October 6, 2008 @ 04:57
Hey,
I added notification and mail api’s that are available with the dominion update to your client. Shoot me an email if you’d like to code review the diff and let me know if you want it committed back to svn.
Thanks,
Matt
Comment by Matt — December 4, 2009 @ 09:39