Ejemplo n.º 1
0
 def test_create_webhook(self):
     webhook = Webhook()
     room = Room.get(session, name=roomname)
     webhook.set_targetUrl('http://foo.net/api/v1')
     webhook.set_filter('roomId={}'.format(room.id))
     webhook.set_name('python sdk testing webhook')
     webhook.set_resource('messages')
     webhook.set_event('created')
     resp = webhook.create(session)
     self.assertTrue(resp.ok)
Ejemplo n.º 2
0
 def createRoomWebhook(self, roomname, webhookUrl, webhookName):
     webhook = Webhook()
     room = Room.get(self.session, name=roomname)
     webhook.set_targetUrl(webhookUrl)
     webhook.set_filter('roomId={}'.format(room.id))
     webhook.set_name(webhookName)
     webhook.set_resource('messages')
     webhook.set_event('created')
     webhook.create(self.session)
     return webhook
Ejemplo n.º 3
0
 def test_create_webhook(self):
     webhook = Webhook()
     room = Room.get(session, name=roomname)
     webhook.set_targetUrl('http://foo.net/api/v1')
     webhook.set_filter('roomId={}'.format(room.id))
     webhook.set_name('python sdk testing webhook')
     webhook.set_resource('messages')
     webhook.set_event('created')
     resp = webhook.create(session)
     self.assertTrue(resp.ok)