There’s a new revision of Reve that has just been uploaded to Rubyforge: Revision 99.
This includes a major change - Reve is now licensed under a proper license: the MIT License. The terms of the license are now distributed with the package and are.
There is also a fix for the character_id that came back from a market order request.
Why a new license now? Simply because I think it’s important to realise that it’s unlikely that anyone will use Reve to create some billion dollar enterprise that I could have got in on. Yeah, not everyone can be Delicious, Flickr or Facebook. ha ha.
So go forth, ye multitudes and fix, hax, and use. Ruby and Rails both use the MIT license so now Reve should be at home.
Just a quick note. There’s a new Reve gem out as of June 7th. This one’s release notes are:
- Typo fix in Reve::Classes::MapKill - shipJills -> shipKills
- Resolve trac ticket 3 (lowercase field names in postfields method)
- Update documentation to make ‘charid’ more consistantly ‘characterid’
- Resolve trac ticket 2 (Reve does not use @charid, but takes it as an argument in initialize)
- Be strict about currentTime’s casing.
The code changes can be seen At the Reve Trac.
Yesterday we launched Mini Match, an application me and my colleagues from work wrote for Cartoon Network.
Late last year we opened a beta that was, unfortunately, short lived. Friday (May 30, 2008) we opened the system up on a much improved codebase for a few hours and had all systems “green”. Based on the positive success from Friday we opened it up yesterday.
It opened slowly at first with just a small advertisement on the Cartoon Network Games’ Page, and then a larger one on the same page and then we made the Cartoon Network home page with a small advertisement again. Today, I reckon, a larger advertisement will be put on the front page and we’ll really start to see traffic!
Some details on the application:
- Flash/Flex/AS/Whatever front-end GUI (really, it’s one of them)
- Java-based persistance server
- Rails-based funnel into the database with a bit of logic.
The Rails part is RESTful (for the most part) and is the “glue” of the application, to quote someone from IRC.
Today should be a fun day!
Another Reve release, 86. This time I’m fixing a bug with the strict XML parsing not picking up cachedUntil. Tests and test XML have been fixed. Check trac for specific changes.
Just a quick note! I’ve been busy and have not had time to push this Reve release. Wish I had done it earlier but it’s here now.
Reve Release 83 with release notes at rubyforge. Short story is that I’ve fixed a bug with personal_wallet_tansactions method and fixed a bug with short XML tags causing problem with writing XML to disk for re-use.
Good luck!
Had my first bug report today about the to_i method I made on the String class breaking Rails migrations because leading zeroes weren’t being treated nicely in my method: "001".to_i # => 1 and fails the test 1.to_s == "001" and so a String was being returned fromto_i. Crap.
I don’t think that I need the method anyways (I’m going to spend part of today to make sure with more tests!) so I’ve removed it and tagged Release 80 and uploaded the gem to RubyForge. It should be available to gem update or gem install shortly.
This release also has a larger test coverage and some other unnecessary methods were pruned. Check it out!
It’s coming. All I have to do is zip the release up and update the RDoc documentation.
This fully supports the API Version 2. Next tasks on Reve include setting up a Trac as well as refactoring a lot of the methods (corporate and personal methods are almost always identical but wrapped in different classes). I also want to add the ability to save and feed the library your own XML.
Look for Reve revision 39 before the 23rd of December.
Greetings dear readers.
The CCP guy (Garthagk) behind the Eve Online API we all use really has a hard task. As the API becomes more and more popular the stress on the webservers hosting the API and the database servers increases. Bossmen and bosswomen may cut the API from us to save resources (that would suck). It's up to us, the community, to do what we can to lessen the load on CCP's servers.
Garthagk provided us with a cacheduntil (Reve::API.cached_until in Reve). Up unil now Reve didn't privde any mechanism for really using this. Sure, you could use just the cached_until if it's just one character. But one of my hopes is that Reve will be used by operators of multi-user sites (like my vapourware evedb.info) that will aggregate many users' data. Cached_until isn't enough.
Enter the protected method Reve::API#compute_hash. (As of revision 22.)
After each API call Reve will compute a hash to represent that request. This will be available through the last_hash. This will tell you what the hash is after the call. But to respect the cached_until it's polite to check the current time against the "Last Call's" cached_until value. The last call will have a hash and that hash will be the key to the cached_until. Each API call now takes a hash for its parameters intead of the old style comma style. Treat the hash as a of transaction ID.
For a simple example let's get the alliances list:
RUBY:
-
require 'reve'
-
api = Reve::API.new
-
alliances = api.alliances
-
p api.last_hash # => 'eve/Alliances.xml.aspx'
-
api.cached_until
For this simple call nothing has changed except the Reve library presents more info for the user. Store cached_until and last_hash in a database.
For the new parameter to get the hash:
RUBY:
-
require 'reve'
-
api = Reve::API.new
-
a_hash = api.alliances :just_hash => true
-
p a_hash # => 'eve/Alliances.xml.aspx'
A complex example:
RUBY:
-
require 'reve'
-
api = Reve::API.new('userid','apikey')
-
sheet = api.character_sheet :characterid => 0123456789
Get the hash:
RUBY:
-
require 'reve'
-
api = Reve::API.new('userid','apikey')
-
h_sheet = api.character_sheet :characterid => 0123456789, :just_hash => true
With luck this post is clear for Reve's users and all you guys will be kind to the API so we have it in the future.
Finally Reve has a test suite.
Check out the source and just:
cd test
ruby reve_test.rb
I hope it works!
Download an archive for use:
In the last post I made I said that I was going to move away from libcurl and to use Ruby's native net/http library. Well I did it last night.
The Reve page will be updated.