Daniel W. Ottey (dottey) wrote in lj_clients,
Daniel W. Ottey
dottey
lj_clients

XML RPC question

I have been experimenting with the XML RPC interface using a perl program.  I'll let it be known up front that I am a novice at both, and so my question may be pretty stupid.  But hopefully someone can help me.

I am using as a basis a script Brad wrote http://cvs.livejournal.org/browse.cgi/livejournal/src/xmlrpc-client/

I am attempting to use/learn the getevents call.

    $xmlrpc->proxy("http://$acct->{'host'}/interface/xmlrpc");
    my $req = {
         'username' => $acct->{'username'},
         'password' => $acct->{'password'},
         'truncate' => '20',
         'selecttype' => 'day',
         'year' => '2004',
         'month' => '12',
         'day' => '29',
    };
    my $res = $xmlrpc->call('LJ.XMLRPC.getevents', $req);
    if ($res->events) {
        print "blah\n";
        print "Event: " . $res->event;
    }

With this I receive an error:
Can't locate object method "events" via package "XMLRPC::SOM" at ./dan.pl line 41, <C> line 1.

So I'd like to know how to properly retrieve the struct containing an array of events.  And how should I traverse them?  (example: how would I list the subject from each event on that day?)

Thanks for any help!

Subscribe

  • 302: lj_dev

    In the interests of consolidating all LiveJournal development-related discussion, we're going to be closing down this community. The same…

  • Plain text to LJ

    I have an old blog from xanga that's in html/plain text and I want to move it over here. Which client would be the best to do this? I also want to…

  • ljKlient 0.2.0 Preview Release 1

    Today marks another milestone in the development of ljKlient — as the first preview of the 0.2 series is released.  Please go to the project…

  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 4 comments