Exemplo n.º 1
0
def sms():
    push = _jpush.create_push()
    push.audience = jpush.all_
    push.notification = jpush.notification(alert="a sms message from python jpush api")
    push.platform = jpush.all_
    push.smsmessage=jpush.smsmessage("a sms message from python jpush api",0)
    print (push.payload)
    push.send()
Exemplo n.º 2
0
 def post(self):
     push = self.my_push
     push.audience = jpush.all_
     push.notification = jpush.notification(
         alert="a sms message from python jpush api")
     push.platform = jpush.all_
     push.smsmessage = jpush.smsmessage(
         "a sms message from python jpush api", 0)
     return Response(push.send())
Exemplo n.º 3
0
 def sms(self):
     push = self.my_push
     push.audience = jpush.all_
     push.notification = jpush.notification(
         alert="a sms message from python jpush api")
     push.platform = jpush.all_
     push.smsmessage = jpush.smsmessage(
         "a sms message from python jpush api", 0)
     push.send()
Exemplo n.º 4
0
def sms(alert, message):
    lock.acquire()
    try:
        push = _jpush.create_push()
        push.audience = jpush.all_
        push.notification = jpush.notification(alert=alert)
        push.platform = jpush.all_
        push.smsmessage = jpush.smsmessage(message, 0)
        print(push.payload)
        push.send()
    finally:
        lock.release()
Exemplo n.º 5
0
import jpush as jpush
from conf import app_key, master_secret
_jpush = jpush.JPush(app_key, master_secret)
_jpush.set_logging("DEBUG")
push = _jpush.create_push()
push.audience = jpush.all_
push.notification = jpush.notification(
    alert="a sms message from python jpush api")
push.platform = jpush.all_
push.smsmessage = jpush.smsmessage("a sms message from python jpush api", 0)
print(push.payload)
push.send()
Exemplo n.º 6
0
import jpush as jpush
from conf import app_key, master_secret
_jpush = jpush.JPush(app_key, master_secret)
_jpush.set_logging("DEBUG")
push = _jpush.create_push()
push.audience = jpush.all_
push.notification = jpush.notification(alert="a sms message from python jpush api")
push.platform = jpush.all_
push.smsmessage=jpush.smsmessage("a sms message from python jpush api",0)
print (push.payload)
push.send()