This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
paas /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun Oct 18 07:13:15 -0700 2009 | |
| |
README.markdown | Sun Oct 25 23:48:14 -0700 2009 | |
| |
api.rb | Sun Oct 25 23:41:45 -0700 2009 | |
| |
bot.rb | Sun Oct 25 23:41:45 -0700 2009 | |
| |
config.ru | Sun Oct 18 08:51:57 -0700 2009 | |
| |
global.rb | Mon Oct 19 01:20:00 -0700 2009 | |
| |
myconfig.rb.sample | Mon Oct 19 22:17:37 -0700 2009 | |
| |
public/ | Sun Oct 25 23:41:45 -0700 2009 | |
| |
views/ | Sun Oct 25 23:41:45 -0700 2009 |
README.markdown
What is PaaS
Presence-As-A-Service (PaaS) is using XMPP presence stanzas for microblogging, online status displaying etc.
Why?
- Because Google XMPP implementation sucks
- Because XMPP presences are uncomplete (missing timestamp)
- Need it for other services (ReaTiWe)
How?
Install
- Needed gems: eventmachine, xmpp4r, xmpp4r-simple, json, ratom, httpclient, sequel, sinatra
- Copy myconfig.rb.dist to myconfig.rb and adjust your settings
- Start the bot (this will create also database [sqlite3], if missing): ruby ./bot.rb
- Start the API:
- via rackup: rackup -p 8080
- standalone: ruby ./api.rb -p 8080
Usage
- Add the bot to your roster
- PING to test the connection
- HELP to see the available bot commands
- Send LOGIN command to register (and accept the authorization request)
- Change your nick - NICK ... to hide your real JID
- Enable PuSH publishing - ON
- All your presence changes will be saved - time, status, message
- To trac only some presences (extended away - XA) - QUIET
What you've get?
Web (HTTP services)
- /last/:nick/:type - Text/image (.png) user status (status, message, timestamp)
- /atom/:nick - Atom feed with latest 10 presences (pinging PuSH hub on update)
- /photo/:nick - Return the XMPP Vcard photo ("PHOTO/BINVAL")
- /json (optional ?callback=... parameter) JSON/JSONP with latest 10 presences
- /stream and /user/:nick - demo services
XMPP (bot commands)
- HELP, H, help, ? : List all local commands
- PING, P, ping : Connection test
- LOGIN, L, login : Register in the system
- ONLINE, O, online : Online users list
- STAT[US], S, stat[us] [JID] : Get JID status - 'away' etc.
- NICK, N, nick [name] : Change/show your nick (2-16 chars, [A-Za-z0-9_])
- MSG, M, msg {nick} {text} : Direct message {text} to user {nick}
- ON/OFF, on/off : Enable/disable presences sharing
- QUIET/VERBOSE, quiet/verbose : Trac all or only XA presences
You can make your own install, or use the status@zhware.net bot and http://status.zhware.net/ URL for API calls and to see the results.







