Development guide
Accessing the API endpoint
The API is listening on http://rest.receptor.tarpipe.net:8000/. You send data to us by making an HTTP POST to that URL.
The API accepts three optional POST parameters:
title- you can use this field to send the title of the data your posting
body- this field is supposed to carry larger pieces of text, like a blog post, for example
image- this field let's you send any type of binary data
There is a mandatory GET parameter:
- key
- the token generated when you save a REST API workflow
multipart/form-data encoding type, either by using the -F curl option or by defining it in your code.
Example 1. Using curl
This is probably the easiest way to post data. If you don't have curl take a look at its official site.
curl -F title="hello" -F body="world" http://rest.receptor.tarpipe.net:8000/?key=<YOUR WORKFLOW TOKEN>
Example 2. Using an HTML form
Another way
<html>
<body>
<form action="http://rest.receptor.tarpipe.net:8000/?key=<YOUR WORKFLOW TOKEN>"
method="POST" enctype="multipart/form-data">
<p><input type="text" name="title"/></p>
<p><input type="text" name="body"/></p>
<p><input type="submit" name="Submit"/></p>
</form>
</body>
</html>
Current implementations
- WWW::TarPipe Perl module, by Andy Armstrong;
- TarPipe Python API, by Alcides Fonseca;
- PHP implementation, by José Silva;
- TarPipe API for Ruby, by Ruben Fonseca and Tiago Pinto.
