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:
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/.
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:
upload
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.
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 new and 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.
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.
WWW::TarPipe requires no configuration files or environment variables.
None.
None reported.
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.
bug-www-tarpipe@rt.cpan.org
Andy Armstrong <andy@hexten.net>
<andy@hexten.net>
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.
To install WWW::TarPipe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::TarPipe
CPAN shell
perl -MCPAN -e shell install WWW::TarPipe
For more information on module installation, please visit the detailed CPAN module installation guide.