
Journal pudge's Journal: Subscribers Can Now Use SOAP for Slashdot Journals 9
Awhile back I added a SOAP interface for Slash journals. It lets you post journal entries, modify existing entries, delete entries, get entries for a specific user, and get individual entries.
I also implemented a perl distribution called Slash-Client to make it nice and easy to use. The base class, Slash::Client, defines the methods for the SOAP calls, including authentication. Slash::Client::Journal implements the specific journal methods.
There's two basic ways to authenticate, using a UID and password, or a logtoken (which can optionally be read straight from your browser's cookie file). So, as a quick example:
use Slash::Client::Journal;
# cookie file found automatically for Firefox on Mac OS X,
# so auth done automatically (patches welcome for others)
my $journal = Slash::Client::Journal->new({
host => 'slashdot.org',
ssl => 1,
});
my $id = $journal->add_entry({
subject => 'w00t',
body => 'this is the coolest thing EVAR'
});
my $get = $journal->get_entry($id);
Reskeys (those things that are replacing formkeys, that don't let you abuse our resources) apply, so you can't just spam us with a bunch of journal entries and so on with SOAP any more than you could with the web interface.
I've been using Slash-Client to post pretty much all my own journal entries (including this one) for months now: I just type into BBEdit, the first line is the subject, the rest is the body, and I Select All and hit a key combo to run the script to send it. It's worked well for me. I wrote a small Pudge::Journal class which calls Pudge::NowPlaying to put the fancy Now Playing link at the bottom, and off it goes.
Let me know if you have any questions.
Now Playing: Wolfgang Amadeus Mozart - Serenade No.9 in D
Excellent (Score:2)
Sounds interesting (Score:1)
Out of interest, does this interface include ways to get at friends/fans/foes/freaks and/or a user's amigos?
Re:Sounds interesting (Score:2)
Re:Sounds interesting (Score:1)
WSDL URL? (Score:2)
There's a lot of demand from some people as far as archiving JE's to their hard drive, and some perl scripts I've seen access the page often enough to get the user locked out for a spell. If there's a way to do it through one or more SOAP methods, that would be beneficial, and use less resources / bandwidth.
Plus I'd probably write the client just to show off. ;)
Re:WSDL URL? (Score:2)
Re:WSDL URL? (Score:2)
Is there a UDDI?
Re:WSDL URL? (Score:2)
Subscriber features list (Score:2)
Cool! Don't forget to get the most mileage possible out of this by adding it to the subscriber plums list [slashdot.org]. I'm sure someone will build Python bindings and everything else that the rest of the world (poor souls) would want.
Hopefully the fact that you have to subscribe to use it would mean that there wouldn't be too many problems with abuse for reskeys to have to stop.
BTW, looking over that list, I noticed that the following is listed as a subscriber feature: "You can get a message sent to you when peop