the official tarpipe blog

June 29, 2009

tarpipe nominated for TechCrunch Europas awards

We're honored to see tarpipe among TechCrunch's chosen list of the Best Web Applications or Services. The Europas are best described by TechCrunch:

These awards will recognise and celebrate the most compelling technology startups, Internet and mobile innovations of the past year (Summer 08 - Summer 09), with the tech community invited to have a say in which finalists should be recognised.

The Europas awards

The winners will be chosen by an advisory board from the most voted nominees, so please take a moment to vote for your favorite application. Thank you for using tarpipe and helping us deliver a great application.

Filed under: news — Bruno Pedro @ 10:18 pm UTC

June 3, 2009

Extending tarpipe with the REST connector

[warning: technical information ahead]

We've created a connector that lets you easily extend any workflow by connecting to an external REST endpoint. The REST connector is compatible with the Yahoo! Pipes Web Service Module — the only difference is that we only process with a single entry instead of a feed of entries.

The connector POSTs a JSON encoded list of properties to a service URL and expects a JSON or RSS formatted response. Here's an example JSON response:

  1. {
  2. "items"[
  3. {
  4. "title" : "My title",
  5. "link" : "http://example.com",
  6. "description" : "My Description"
  7. }
  8. ]
  9. }

The compatibility means that you can use any existing Web Service that already worked with Yahoo! Pipes. OpenCalais offers a service with those characteristics and we decided to give it a try with our new REST connector.

This example workflow uses the REST connector to talk directly to the Calais Yahoo! Pipes Web Service. The OpenCalais URL (including the API key) is specified using the TextInput connector.

Creating your own external Web service is also very easy. All you have to do is wait for a POST, process the incoming JSON information and output a JSON formatted response. Here's an example written in PHP:

  1. <?php
  2. //
  3. // Obtain the input from the POST "data" field
  4. //
  5. $input = json_decode($_POST['data']);
  6.  
  7. if ($input) {
  8. //
  9. // As an example, the output is copied from the input
  10. //
  11. $output = array();
  12. $output['title'] = $input->items[0]->title;
  13. $output['link'] = $input->items[0]->link;
  14. $output['description'] = $input->items[0]->description;
  15.  
  16. //
  17. // Output JSON encoded response
  18. //
  19. echo json_encode(array('items' => array($output)));
  20. }
  21. ?>

We hope this new REST connector will create new possibilities and expand what you can already do with your workflow. Please let us know how you'll use it with your Web services.

Filed under: code, news, release, workflow — Bruno Pedro @ 9:48 pm UTC

Powered by WordPress