Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
Slashdot.org

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.

This discussion was created by pudge (3605) for no Foes, but now has been archived. No new comments can be posted.

Subscribers Can Now Use SOAP for Slashdot Journals

Comments Filter:
  • Great work. I will put this into use in the very near future!
  • When I find some time to start writing code again I might look into this.

    Out of interest, does this interface include ways to get at friends/fans/foes/freaks and/or a user's amigos?
    • No, but there's RSS for zoo, e.g. /~pudge/foes/rss. Although it is not working now, it will be for next refresh, this week.
      • That could work I suppose... Unfortunately any hacking of Slashdot's SOAP interface will have to wait until things die down at work - I'll have to make a note to myself so I don't forget to come back to this.
  • What's the URL for the WSDL file for C/C++/C#/Java Clients using such tools as gSOAP and sproxy.exe?

    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. ;)

  • 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

Counting in binary is just like counting in decimal -- if you are all thumbs. -- Glaser and Way

Working...