NAME
WebService::Timelog - A Perl interface to Timelog API
SYNOPSIS
use WebService::Timelog;
my $timelog = WebService::Timelog->new(
username => $username,
password => $password,
);
# update status
$timelog->new_msg(text => $text);
# or you can do so like this
$timelog->update($text);
# retrieve public messages
my $public_messages = $timelog->public_msg(cnt => $count, since => $since);
# retrieve friends' messages
my $friends_messages = $timelog->friends_msg(cnt => $count, since => $since);
# retrieve direct messages
my $direct_messages = $timelog->direct_msg(cnt => $count);
# retrieve some information on you
my $me = $timelog->show();
# retrieve some informtion on your friends
my $friends = $timelog->friends(cnt => $count);
DESCRIPTION
Timelog is one of so-called microblogs like Twitter. This module provides an easy way to communicate with it.
NOTE: The interfaces this module offers can be changed later along with Timelog API's updates.
METHODS
new ( %conf )
my $timelog = WebService::Timelog->new(
username => $username,
password => $password,
);
Creates and returns a new WebService::Timelog object.
Both username and password are required. If not passed in, it will croak immediately.
new_msg ( %args )
$timelog->new_msg(text => $text);
Updates your status.
Make sure that it will croak immediately, if request failed. It's also applicable to the methods described below.
update ( $text )
$timelog->update($text);
This method is an alias for new_msg() described above, but the argument takes a different form from new_msg(). It's to make consistent with the same name one of Net::Twitter.
public_msg ( %args )
my $public_messages = $timelog->public_msg(cnt => $count, since => 200705170900);
Retrieves Timelog messages in public. For more details, consult the official documentation of Timelog API.
friends_msg ( %args )
my $friends_messages = $timelog->friends_msg(cnt => $count, since => 200705170900);
Retrieves your friends' messages.
direct_msg ( %args )
my $direct_messages = $timelog->direct_msg(cnt => $count);
Retrieves direct messages sent to you.
show ()
my $me = $timelog->show();
Retrieve some information on you.
friends ( %args )
my $friends = $timelog->friends(cnt => $count);
Retrieve some information on your friends.
ua ()
$timelog->ua(timeout => 10);
This method returns LWP::UserAgent object internally used in the WebService::Timelog object. You can set some other options which are specific to LWP::UserAgent via this method.
SEE ALSO
Official Timelog API documentation
AUTHOR
Kentaro Kuribayashi <kentaro@cpan.org>
COPYRIGHT AND LICENSE (The MIT License)
Copyright (c) 2007, Kentaro Kuribayashi <kentaro@cpan.org>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.