コード例 #1
0
ファイル: client.py プロジェクト: seanbrant/pigeon
 def publish(self, channel, body=None):
     payload = json_dumps({
         'channel': channel,
         'body': body,
     })
     self.db.publish('pigeon:publish', payload)
コード例 #2
0
ファイル: messages.py プロジェクト: seanbrant/pigeon
 def to_json(self):
     return json_dumps({
         'channel': self.channel.name,
         'body': self.body,
     })
コード例 #3
0
ファイル: actions.py プロジェクト: seanbrant/pigeon
 def to_json(self):
     return json_dumps({
         'type': self.type,
         'channel': self.channel,
     })