Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 config
Octocat-spinner-32 db
Octocat-spinner-32 doc
Octocat-spinner-32 lib
Octocat-spinner-32 log
Octocat-spinner-32 public
Octocat-spinner-32 script
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rbenv-version
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 config.ru
README.md

Welcome to ze Tribioune

GET recent message for the "laplagedigitale" room

curl -H "Accept: application/json" -H "Content-type: application/json" http://localhost:3000/laplagedigitale/messages

[{"body":"message number 41","created_at":"2012-05-25T22:40:28+02:00","user_name":"yannski","uid":"4fbfee3c312f916d1500002a"},{"body":"message number 42","created_at":"2012-05-25T22:40:28+02:00","user_name":"yannski","uid":"4fbfee3c312f916d1500002b"},{"body":"message number 43","created_at":"2012-05-25T22:40:28+02:00","user_name":"yannski","uid":"4fbfee3c312f916d1500002c"},{"body":"message number 44","created_at":"2012-05-25T22:40:28+02:00","user_name":"yannski","uid":"4fbfee3c312f916d1500002d"},{"body":"message number 45","created_at":"2012-05-25T22:40:28+02:00","user_name":"yannski","uid":"4fbfee3c312f916d1500002e"}]

POST a message in the "laplagedigitale" room

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"body": "pipo molo"} ' http://localhost:3000/laplagedigitale/messages

{"body":"pipo molo","created_at":"2012-05-25T23:09:56+02:00","user_name":"curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3","uid":"4fbff524312f91673d000007"}

try to POST a message in the "héhé" room (héhé is not a valid name and will return an HTTP 422)

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"body": "pipo molo"} ' http://localhost:3000/héhé/messages

{"room_name":["is invalid"]}

Something went wrong with that request. Please try again.