Next:
Yawns::Weblogs
Previous:
Yawns::Users
 [Table of Contents]

Yawns::Weblog



NAME

Yawns::Weblog - A module for interfacing with a single weblog.

SYNOPSIS

    #!/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 );

DESCRIPTION

This module will allow a user to work with their weblogs:

   * Adding an entry.
   * Editing an entry.
   * Deleting an entry.

new

  Create a new instance of this object.

count

  Count the number of weblog entries the given user has made.

add

  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

  Edit an existing weblog entry.

remove

  Remove a given weblog entry.

  NOTE: This doesn't remove any comments associated with the entry.

getTitle

  Return the title of the given weblog entry.

report

  Flag an entry as abusive.

getScore

  Return the current score of a weblog

getCommentCount

  Return the count of comments upon this weblog.

getOwner

  Return the owner of the given weblog entry.

getLink

  Return the link to the weblog entry with the given GID.

getID

  Return the ID of the given weblog entry.

getGID

  Return the GID of the given user's weblog entry.

  NOTE: Not cached - because this causes problems if the username + id
 isn't stored...

getSingleWeblogEntry

  Return a single weblog entry.

getReadCount

  Return the number of times a particular weblog entry has been read.

increaseReadCount

  Increase the number of times a particular weblog has been read.

getEntries

  Get the specified users weblog data from the database

getWeblogFeed

  Get the weblog feed for the given user.

invalidateCache

  Clean any cached content we might have.

AUTHOR

Steve Kemp

http://www.steve.org.uk/

LICENSE

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.


[Top] Generated by HTML::FromPod 0.49 on Fri Nov 21 03:03:58 2008