Log in

No account? Create an account
Ruby module for LiveJournal - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Ruby module for LiveJournal [Jun. 1st, 2002|01:12 pm]
LiveJournal Client Discussions
I wrote this a while ago, but never had a use for it so I never published it.

This is a LiveJournal module for the language Ruby, which is a sort of cross between Smalltalk and Perl but is more often compared to Python.

It currently only wraps a subset of the LiveJournal protocol, but adding to it should be trivial because the framework is in place.

Or, read the unfinished docs.

Here is some sample code, which dumps your friend-of list and demonstrates some objects:

require 'livejournal'

user = LiveJournal::User.new('test', 'test')
req = LiveJournal::Request::FriendOfs.new(user)
friendofs = req.run()
friendofs.each {|friend|
  puts "#{friend.fullname} (#{friend.username})"

Hopefully it's self-explanatory. :)

[User Picture]From: youngoat
2002-06-03 04:11 pm (UTC)

Livejournal ruby module

While I don't use ruby, I just wanted to say that I really like the class structure... It's just so nice and clean. =]
(Reply) (Thread)