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/socket
(or for the secure socket)
wss://$host:$port/socket
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
Key | Meaning |
---|---|
TWITTER_KEY |
Twitter Account Key |
TWITTER_SECRET |
Twitter Account Secret |
TWITTER_BEARER_TOKEN |
Twitter OAuth Bearer Token |
WFINFO_FILTERED_ITEMS |
WF Info filtered items source json url |
WFINFO_PRICES |
WF Info prices source json url |
DISABLE_PRICECHECKS |
Disable pricecheck services |
SENTRY_DSN |
Sentry DNS for reporting errors |
BUILD |
Whether or not to forcibly build caches on startup |
LOG_LEVEL |
Logging level for logging |
HOST /HOSTNAME |
host or hostname for hosting service |
PORT /IP |
Port or IP address for hosting service |
It's highly recommended to use the local loopback (127.0.0.1) for HOST/HOSTNAME