#NEWLINE# def ws_publish( self , wsrequest ) : #NEWLINE# #INDENT# "Publish an event on a channel\n\n        From the client::\n\n            client.rpc('publish', {'channel': 'mychannel',\n                                   'event': 'myevent',\n                                   'data': data})\n        " #NEWLINE# channel = wsrequest . required_param ( 'channel' ) #NEWLINE# event = wsrequest . required_param ( 'event' ) #NEWLINE# channels = wsrequest . ws . channels #NEWLINE# data = wsrequest . params . get ( 'data' ) #NEWLINE# user = user . cache . user_info #NEWLINE# return channels . publish ( channel , event , data , user = user )