A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/webpipes/webpipe-examples below:

webpipes/webpipe-examples: A community resource offering hosted examples along with source code.

Welcome to the world's finest private collection of meticulously handcrafted WebPipes.

This project is a single web service (available at webpip.es) built on top of the ZEIT Now cloud platform.

*Note: As of 6/8/2019, only NodeJS examples exist the moment. However,we should be able to include any Now-supported runtime.

As a convenience, each example is publically available at via webpip.es. You can check now.json for each example's HTTP pathname, but basically, the folder each lives in is also the HTTP pathname. Accordingly, you can find the ./api/parse-url example is available via https://webpip.es/parse-url:

curl -v -X OPTIONS https://webpip.es/parse-url
Response body is the input & output block definitions.
{
  "name": "Parse URL",
  "description": "Parse URL using WHATWG URL Standard.",
  "inputs": [
    {
      "name": "url",
      "type": "string",
      "description": "A url to parse."
    }
  ],
  "outputs": [
    {
      "name": "parts",
      "type": "objects",
      "description": "Returns the parsed URL parts."
    }
  ]
}

Nice things are nice. Please be mindful and keep your use & usage responsible. It's intended to serve primarily as a hands-on demonstration for newcomers.

Try running a few client requests locally. Just run node index.js inside the example folder, or now dev if you prefer.

It may be a bit easier starting with the very minimal calculate-square-root WebPipe. That said, the examples aren't structured in any particular order or and don't have any sort of difficulty levels, so feel free to explore in whatever way feels most comfortable.

curl -v -X OPTIONS \
  https://webpip.es/inspect-hostname-dns
Response body is the input & output block definitions.
{
  "name": "DNS Lookup",
  "description": "Determine whether or not a hostname exists.",
  "inputs": [
    {
      "name": "hostname",
      "type": "string",
      "description": "A hostname to lookup."
    }
  ],
  "outputs": [
    {
      "name": "ok",
      "type": "bool",
      "description": "Returns true of false if lookup succeeds."
    }
  ]
}

In this example, we're invoking a block named inspect-hostname-dns. This block lets us know if a given domain name is available for purchase. So, all we have to do is provide. a hostname then the block does its work to find us answer.

curl -v -X OPTIONS \
  https://webpip.es/inspect-hostname-dns
Response body is the input & output block definitions.
{
  "name": "DNS Lookup",
  "description": "Determine whether or not a hostname exists.",
  "inputs": [
    {
      "name": "hostname",
      "type": "string",
      "description": "A hostname to lookup."
    }
  ],
  "outputs": [
    {
      "name": "ok",
      "type": "bool",
      "description": "Returns true of false if lookup succeeds."
    }
  ]
}
curl -i -X POST \
  -H "Content-Type: application/json" \
  -d '{"inputs":[{"domain":"google.com"}]}' \
  https://webpip.es/inspect-hostname-dns
Response body should match definition described above...
{
  "outputs": [
    {
      "ok": true
    }
  ]
}

Oh well, looks lke that particular domain is already taken!

Maybe spend some time examining the other demo blocks here to get a better feel for their behavior.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4