Why not adopt me?
NAME
WWW::TarPipe - An interface to tarpipe.com's REST based web service.
VERSION
This document describes WWW::TarPipe version 0.01
SYNOPSIS
use WWW::TarPipe;
my $tp = WWW::TarPipe->new(
key => '77c38f56696963fa13f5b6cd97a2556c'
);
$tp->upload(
title => 'The outside temperature is 27C'
);
DESCRIPTION
tarpipe.com is a publishing mediation and distribution platform that simplifies regular upload activities:
Publishing content to multiple Web locations;
Combining different media into a single blog post or article;
Transforming documents on-the-fly;
Managing repeatable upload actions.
You can learn more by visiting http://tarpipe.com/.
INTERFACE
new
Create a new WWW::TarPipe. Accepts a number of key, value pairs. The following arguments are recognised:
base_uri
-
The base URI for the tarpit REST service. Defaults to
http://rest.receptor.tarpipe.net:8000/
title
-
The title of the data being posted.
body
-
A larger chunk of text associated with this post such as a blog post.
image
-
A chunk of binary data - perhaps an image - for this post.
key
-
The token generated when you save a REST API workflow.
Any options not passed to new
may be passed to a subsequent call to upload
, for example:
my $tp = WWW::TarPipe->new(
key => '77c38f56696963fa13f5b6cd97a2556c'
);
$tp->upload(
title => 'The outside temperature is 27C'
);
is equivalent to
my $tp = WWW::TarPipe->new;
$tp->upload(
key => '77c38f56696963fa13f5b6cd97a2556c',
title => 'The outside temperature is 27C'
);
When making multiple posts to the same workflow it is convenient to supply unchanging options as arguments to new
and pass those that change to upload
.
upload
Send an upload request to the tarpit.com REST service. A number of key, value argument pairs should be passed. See new
above for details of the arguments that can be specified.
$tp->upload(
key => '77c38f56696963fa13f5b6cd97a2556c',
title => 'Hello, World',
body => "First Post!\nYay me!\n"
);
If the request fails an exception will be thrown.
Accessors
Each of the options that may be supplied to new
and upload
have a corresponding read only accessor.
base_uri
The base URI for the tarput service.
title
The title of the post.
body
The body of the post.
image
Arbitrary image data.
key
The REST key for the workflow.
default_base_uri
Returns the default URI for the tarpipe service. May be overridden in subclasses or by supplying the base_uri
option to new
or upload
.
CONFIGURATION AND ENVIRONMENT
WWW::TarPipe requires no configuration files or environment variables.
DEPENDENCIES
None.
INCOMPATIBILITIES
None reported.
BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests to bug-www-tarpipe@rt.cpan.org
, or through the web interface at http://rt.cpan.org.
AUTHOR
Andy Armstrong <andy@hexten.net>
LICENCE AND COPYRIGHT
Copyright (c) 2008, Andy Armstrong <andy@hexten.net>
.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.