WebService::LiveJournal::Event - LiveJournal event class
version 0.08
create an event
use WebService::LiveJournal; my $client = WebService::LiveJournal::Client->new( username => $user, password => $password, ); # $event is an instance of WS::LJ::Event my $event = $client->create_event; $event->subject("this is a subject"); $event->event("this is the event content"); # doesn't show up on the LiveJournal server # until you use the update method. $event->update; # save the itemid for later use $itemid = $event->itemid;
update an existing event
use WebService::LiveJournal; my $client = WebService::LiveJournal::Client->new( username => $user, password => $password, ); my $event = $client->get_event( $itemid ); $event->subject('new subject'); $event->update;
This class represents an "event" on the LiveJournal server.
Required.
The subject for the event.
The content of the event.
Year
Month
Day
Hour
Minute
One of
Relevant when security is usemask. A 32-bit unsigned integer representing which of the user's groups of friends are allowed to view this post. Turn bit 0 on to allow any defined friend to read it. Otherwise, turn bit 1-30 on for every friend group that should be allowed to read it. Bit 31 is reserved.
The picture tag to use for this entry. Each icon picture may have one or more tags, you can select it by using any one of those tags for this attribute.
Read only.
The LiveJournal item id
URL for the LiveJournal event.
The authentication number generated for this entry Probably best ignored.
If editing a shared journal entry, include this key and the username you wish to edit the entry in. By default, you edit the entry as if it were in user "user"'s journal, as specified above.
Property hash
Create a new (if it isn't on the LiveJournal server yet) or update the existing event on the LiveJournal server.
Returns true on success.
This method signals an error depending on the interface selected by throwing an exception or returning undef.
An alias for update.
Remove the event on the LiveJournal server.
Get the property with the given key
Set the property with the given key and value
Returns the tags for the event as a list.
Set the tags for the event.
Set the access for the event. The first argument is the type:
Entry will be readable by anyone
Entry will be readable only by the journal owner
Entry will be readable only by the journal owner's friends
Entry will be readable only by the members of the given groups.
Returns the access information for the entry. It will always return the type as defined above in the set_access method. In addition for the group type the list of groups will also be returned:
set_access
group
my($type, @groups) = $event-E<gt>get_access
WebService::LiveJournal
Graham Ollis <plicease@cpan.org>
This software is copyright (c) 2013 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WebService::LiveJournal, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::LiveJournal
CPAN shell
perl -MCPAN -e shell install WebService::LiveJournal
For more information on module installation, please visit the detailed CPAN module installation guide.