NAME

WWW::Fimfiction - CRUD tasks for fimfiction.net

SYNOPSIS

use WWW::Fimfiction;

my $ua = WWW::Fimfiction->new;

$ua->login($username, $password);

$ua->add_chapter($story_id, 'My Fabulous Chapter %i%', $text);

METHODS

Methods without explicit return values will return the WWW::Fimfiction object. Methods will croak if something goes wrong.

new

Makes a new object.

login

Args: ($username, $password)

Authenticates the user. Tasks that manipulate data on the site require authentication, so you'll have to call this before trying to add/edit/delete stuff.

add_chapter

Args: ($story_id, [$chapter_title, $content])

Adds a chapter to the given story. Returns the chapter id.

If provided, additional arguments will be given to edit_chapter().

edit_chapter

Args: ($id, $title, $content)

Edits chapter with the given title and content.

publish_chapter

Args: ($id)

Toggles the publish status of a chapter. Returns 1 or 0 indicating the chapter's publish status.

delete_chapter

Args: ($id)

Deletes a chapter.

get_story

Returns a hash ref of story metadata.

AUTHOR

Cameron Thornton <cthor@cpan.org>

COPYRIGHT

Copyright (c) 2012 Cameron Thornton.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.