本文整理汇总了Python中Channel.DEFAULT_HOST方法的典型用法代码示例。如果您正苦于以下问题:Python Channel.DEFAULT_HOST方法的具体用法?Python Channel.DEFAULT_HOST怎么用?Python Channel.DEFAULT_HOST使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Channel
的用法示例。
在下文中一共展示了Channel.DEFAULT_HOST方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_pushMessage_to_user
# 需要导入模块: import Channel [as 别名]
# 或者: from Channel import DEFAULT_HOST [as 别名]
def test_pushMessage_to_user():
c = Channel(apiKey, secretKey)
c.DEFAULT_HOST=dev_host
push_type = 1
optional = dict()
optional[Channel.USER_ID] = 815730795201756090
#optional[Channel.USER_ID] = 665778416804465913
#optional[Channel.CHANNEL_ID] = 4617656892525519033
optional[Channel.CHANNEL_ID] = 4320553738754859600
#推送通知类型
optional[Channel.DEVICE_TYPE] = 4
optional[Channel.MESSAGE_TYPE] = 1
optional['phone_type'] = 'io'
ret = c.pushMessage(push_type, message, hashlib.md5(str(datetime.datetime.now())).hexdigest(), optional)
print ret
示例2: test_pushMessage_to_user
# 需要导入模块: import Channel [as 别名]
# 或者: from Channel import DEFAULT_HOST [as 别名]
def test_pushMessage_to_user():
c = Channel(apiKey, secretKey)
c.DEFAULT_HOST=dev_host
push_type = 1
optional = dict()
#optional[Channel.USER_ID] = 900581881515728799
optional[Channel.USER_ID] = 654406316281477917
#optional[Channel.USER_ID] = 665778416804465913
#optional[Channel.CHANNEL_ID] = 4617656892525519033
optional[Channel.CHANNEL_ID] = 3800664848253686124
#optional[Channel.CHANNEL_ID] = 3800664848253686124
#推送通知类型
optional[Channel.DEVICE_TYPE] = 4
optional[Channel.MESSAGE_TYPE] = 1
optional['phone_type'] = 'ios'
ret = c.pushMessage(push_type, message, hashlib.md5(str(datetime.datetime.now())).hexdigest(), optional)
print ret