@util.positional(2)
def new_webhook_channel(url, token=None, expiration=None, params=None):
 expiration_ms = 0
 if expiration:
  delta = (expiration - EPOCH)
  expiration_ms = ((delta.microseconds / 1000) + ((delta.seconds + ((delta.days * 24) * 3600)) * 1000))
  if (expiration_ms < 0):
   expiration_ms = 0
 return Channel('web_hook', str(uuid.uuid4()), token, url, expiration=expiration_ms, params=params)

@ util . positional ( 2 ) def new_webhook_channel ( url , token = None , expiration = None , params = None ) : expiration_ms = 0 if expiration : delta = ( expiration - EPOCH ) expiration_ms = ( ( delta . microseconds / 1000 ) + ( ( delta . seconds + ( ( delta . days * 24 ) * 3600 ) ) * 1000 ) ) if ( expiration_ms < 0 ) : expiration_ms = 0 return Channel ( 'web_hook' , str ( uuid . uuid4 ( ) ) , token , url , expiration = expiration_ms , params = params )
create a new webhook channel .