Skip to content

Latest commit

 

History

History
52 lines (48 loc) · 686 Bytes

README.md

File metadata and controls

52 lines (48 loc) · 686 Bytes

real-time-ws-pubsub-baas-api

real-time-ws-pubsub-baas-api

Stack

sanic
async, asyncio-redis

Managing Channel

HTTP

Channel List(GET)

http://{hostname}/v1/channel

response :

{
    "data": [
        {
            "channel_name": "a_channel",
            "cnt": 3,
            "rpm": 0
        }
    ]
}

Publish(POST)

http://{hostname}/v1/channel/<channel_name>/publish

response:

{
    "status": "ok"
}

WS

Channel Event

http://{hostname}/channel/{channel_name}/
  • subscribe
  • channel data set redis
  • websocket send & receive response:
{
    "header":"exchange", 
    "body": {"msg":"ok"}
}