| Next: Yawns::Weblogs | Previous: Yawns::Users | [Table of Contents] |
Yawns::Weblog - A module for interfacing with a single weblog.
#!/usr/bin/perl -w
use Yawns::Weblog;
use strict;
#
# Add a weblog entry.
#
my $blog = Yawns::Weblog->new();
$blog->add( username => "username",
title => "Title",
text => "Text" );
#
# Find the email address of a weblog owner.
#
my $lookup = Yawns::Weblog->new( gid => 22 );
This module will allow a user to work with their weblogs:
* Adding an entry. * Editing an entry. * Deleting an entry.
Create a new instance of this object.
Count the number of weblog entries the given user has made.
Add a new weblog entry.
$weblog->add( subject => "Test subject",
body => "Body goes here",
comments_allowed => 1,
);
This function returns the ID of the entry inserted.
Edit an existing weblog entry.
Remove a given weblog entry. NOTE: This doesn't remove any comments associated with the entry.
Return the title of the given weblog entry.
Flag an entry as abusive.
Return the current score of a weblog
Return the count of comments upon this weblog.
Return the owner of the given weblog entry.
Return the link to the weblog entry with the given GID.
Return the ID of the given weblog entry.
Return the GID of the given user's weblog entry. NOTE: Not cached - because this causes problems if the username + id isn't stored...
Return a single weblog entry.
Return the number of times a particular weblog entry has been read.
Increase the number of times a particular weblog has been read.
Get the specified users weblog data from the database
Get the weblog feed for the given user.
Clean any cached content we might have.
Steve Kemp
http://www.steve.org.uk/
Copyright (c) 2007 by Steve Kemp. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license.