在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):geeknam/python-gcm开源软件地址(OpenSource Url):https://github.com/geeknam/python-gcm开源编程语言(OpenSource Language):Python 100.0%开源软件介绍(OpenSource Introduction):python-gcmPython client for Google Cloud Messaging for Android (GCM) Installationpip install python-gcm Features
UsageRead about Google Cloud Messaging from gcm import GCM
gcm = GCM(API_KEY)
data = {'param1': 'value1', 'param2': 'value2'}
# Downstream message using JSON request
reg_ids = ['token1', 'token2', 'token3']
response = gcm.json_request(registration_ids=reg_ids, data=data)
# Downstream message using JSON request with extra arguments
res = gcm.json_request(
registration_ids=reg_ids, data=data,
collapse_key='uptoyou', delay_while_idle=True, time_to_live=3600
)
# Topic Messaging
topic = 'topic name'
gcm.send_topic_message(topic=topic, data=data) See examples directory for more usage details, including error handling. ContributingSee CONTRIBUTING.md LicensingSee LICENSE |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论