File tree Expand file tree Collapse file tree 1 file changed +7
-16
lines changed Expand file tree Collapse file tree 1 file changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -7,20 +7,11 @@ A Python library for interacting with the Apple Push Notification service
7
7
8
8
from pyapns import APNs, Payload
9
9
10
- apns = APNs(
11
- use_sandbox=True,
12
- cert_file='cert-file.pem',
13
- key_file='key-file.pem'
14
- )
15
-
16
- # Send some notifications
17
- token_hex = 'b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c'
18
- payload = Payload(
19
- alert = "Hello World!",
20
- sound = "default",
21
- badge = 4
22
- )
23
-
10
+ apns = APNs(use_sandbox=True, cert_file='cert.pem', key_file='key.pem')
11
+
12
+ # Send a notification
13
+ token_hex = 'b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b87'
14
+ payload = Payload(alert="Hello World!", sound="default", badge=1)
24
15
apns.gateway_server.send_notification(token_hex, payload)
25
16
26
17
# Get feedback messages
@@ -39,7 +30,7 @@ class. Example:
39
30
40
31
## Credits
41
32
42
- Written and maintained by Simon Whitaker at [ Goo Software Ltd] ( http://www.goosoftware.co.uk/ ) .
33
+ Written and maintained by Simon Whitaker at [ Goo Software Ltd] [ goo ] .
43
34
44
35
[ a1 ] :http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008194-CH1-SW1
45
-
36
+ [ goo ] : http://www.goosoftware.co.uk/
You can’t perform that action at this time.
0 commit comments