Simple express app that parses worldState.php
http://$host:$port/$platform
http://$host:$port/$platform/$child-item
http://$host:$port/$a-bunch-of-static-data
ws://$host:$port/sockets
Requests taken as json strings in the socket packet.
Consumers will need to parse responses and stringify requests yourself, as ws doesn't provide a way to automatically parse them.
{"event": "ws:req", "packet": { "platform": "$platform", "language": "$language" }}
{ "event": "twitter" }
{ "event": "rss" }
connecting automatically subscribes the connection to events structured as:
{
"event": "twitter",
"packet": // tweets
}
{
"event": "ws:update",
"packet": // entire updated worldstate
}
{
"event": // worldstate key,
"packet": // worldstate key data
}
probably several others that can take some experimenting