The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::Blogger::API::Core - Blogger API methods

SYNOPSIS

 TBW

DESCRIPTION

Net::Blogger::API::Core defined methods that correspond to the Blogger API.

It is inherited by Net::Blogger::Engine::Base.pm

Blogger API METHODS

$pkg->getUsersBlogs()

Fetch the blogid, url and blogName for each of the Blogger blogs the current user is registered to.

Returns an array ref of hashes.

$pkg->newPost(%args)

Add a new post to the Blogger server.

Valid arguments are :

  • postbody (required)

    Scalar ref.

  • publish

    Boolean.

If the length of postbody exceeds maximum length allowed by the Blogger servers -- 65,536 characters -- currently the text will be chunked into smaller pieces are each piece will be posted separately.

Returns an array containing one, or more, post ids.

$pkg->getPost($postid)

Returns a hash ref, containing the following keys : userid, postid, content and dateCreated.

$pkg->getRecentPosts(%args)

Fetch the latest (n) number of posts for a given blog. The most recent posts are returned first.

Valid arguments are

  • numposts

    Int. If no argument is passed to the method, default is 1.

    "NumberOfPosts is limited to 20 at this time. Let me know if this gets annoying. Letting this number get too high could result in some expensive db access, so I want to be careful with it." --Ev

Returns true or false, followed by an array of hash refs. Each hash ref contains the following keys : postid,content,userid,dateCreated

$pkg->editPost(%args)

Update the Blogger database. Set the body of entry $postid to $body.

Valid arguments are :

  • postbody (required)

    Scalar ref or a valid filehandle.

  • postid (required)

    String.

  • publish

    Boolean.

If the length of postbody exceeds maximum length allowed by the Blogger servers -- 65,536 characters -- currently the text will be chunked into smaller pieces are each piece will be posted separately.

Returns an array containing one, or more, post ids.

$pkg->deletePost(%args)

Delete a post from the Blogger server.

Valid arguments are

  • postid (required)

    String.

  • publish

    Boolean.

Returns true or false.

$pkg->setTemplate(%args)

Set the body of the template matching type $type.

<quote src = "ev">template is the HTML (XML, whatever -- Blogger can output any sort of text). Must contain opening and closing <Blogger> tags to be valid and accepted.</quote>

Valid arguments are

  • template (required)

    Scalar ref.

  • type (required)

    String. Valid types are "main" and "archiveIndex"

Returns true or false.

$pkg->getTemplate(%args)

Fetch the body of the template matching type $type.

Valid types are

  • type (required)

    String. Valid types are "main" and "archiveIndex"

Returns a string.

VERSION

0.2

DATE

September 23, 2002

CHANGES

0.2

  • Added check_* methods.

  • Updated POD

0.1.3

  • Added quotes to $VERSION

0.1.2

  • Updated POD

0.1.1

  • Updated POD

0.1

  • Initial revision.

AUTHOR

Aaron Straup Cope

SEE ALSO

Net::Blogger::Engine::Base

Net::Blogger::API::Extended

LICENSE

Copyright (c) 2001-2002 Aaron Straup Cope.

This is free software, you may use it and distribute it under the same terms as Perl itself.