Benutzer-Werkzeuge

Webseiten-Werkzeuge


friedhof:gobbelz

Dies ist eine alte Version des Dokuments!


Gobbelz

Shack Ansage in der Lounge

Auch: Göbbels, Göbelz, Göbels, Goebbelz, Goebbels

Abstract

gobbelz is running on gobbelz and is providing an API to say things via espeak on kiosk.

API Doku

gobbelz (currently) only offers one feature: saying things. Therefore you need to POST something to gobbelz.shack/say/. Be sure to set your header to Content-Type: application/json. The content is json and should look like this: {„text“ : „hello world“}. The text mustn't exceed 300 chars, but if you fail an error will be thrown.

The server responds with a Status, either success or error. If the request was successfull also the provided text will be returne in a text field. In an error case an error message will be returned.

Code Repository

You will find the actual code on github: https://github.com/shackspace/gobbelz

Example

Here's an example using curl:

  curl -i -H "content-type: application/json" -X POST -d "{\"text\" : \"Hallo shackspace\"}" gobbelz.shack/say/
  
  # or text/plain
  curl -i -H "content-type: text/plain" -X POST -d "Hallo shackspace" gobbelz.shack/say/

And here's the corresponding response:

  HTTP/1.0 200 OK
  Content-Type: application/json
  Content-Length: 55
  Server: Werkzeug/0.9.3 Python/3.3.2
  Date: Sun, 04 Aug 2013 14:55:27 GMT
  
  {
    "status": "success",
    "text": "Hallo shackspace"
  }
friedhof/gobbelz.1470161553.txt.gz · Zuletzt geändert: 2016-08-02 20:12 von 2001:4dd0:ae02:beef:41c7:f111:10a2:e33c