WWW::TarPipe - An interface to tarpipe.com's REST based web service.
This document describes WWW::TarPipe version 0.01
use WWW::TarPipe; my $tp = WWW::TarPipe->new( key => '77c38f56696963fa13f5b6cd97a2556c' ); $tp->upload( title => 'The outside temperature is 27C' );
tarpipe.com is a publishing mediation and distribution platform that simplifies regular upload activities:
You can learn more by visiting http://tarpipe.com/.
Create a new WWW::TarPipe. Accepts a number of key, value pairs. The following arguments are recognised:
The base URI for the tarpit REST service. Defaults to
The title of the data being posted.
A larger chunk of text associated with this post such as a blog post.
A chunk of binary data - perhaps an image - for this post.
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
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.
Each of the options that may be supplied to
upload have a corresponding read only accessor.
The base URI for the tarput service.
The title of the post.
The body of the post.
Arbitrary image data.
The REST key for the workflow.
Returns the default URI for the tarpipe service. May be overridden in subclasses or by supplying the
base_uri option to
WWW::TarPipe requires no configuration files or environment variables.
No bugs have been reported.
Please report any bugs or feature requests to
firstname.lastname@example.org, or through the web interface at http://rt.cpan.org.
Copyright (c) 2008, Andy Armstrong
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.