@@ -24,10 +24,10 @@ Example usage:
2424.. code-block :: python
2525
2626 import urbanairship as ua
27- airship = ua.client.BasicAuthClient(' <app key>' , ' <master secret>' )
27+ client = ua.client.BasicAuthClient(' <app key>' , ' <master secret>' )
2828
2929 # Create and send a push notification
30- push = airship.create_push( )
30+ push = ua.Push(client )
3131 push.audience = ua.all_
3232 push.notification = ua.notification(alert = ' Hello, world!' )
3333 push.device_types = ua.device_types(' ios' , ' android' )
@@ -47,10 +47,10 @@ Example usage:
4747.. code-block :: python
4848
4949 import urbanairship as ua
50- airship = ua.client.BearerTokenClient(' <app key>' , ' <bearer token>' )
50+ client = ua.client.BearerTokenClient(' <app key>' , ' <bearer token>' )
5151
5252 # Create and send a push notification
53- push = airship.create_push( )
53+ push = ua.Push(client )
5454 push.audience = ua.all_
5555 push.notification = ua.notification(alert = ' Hello, world!' )
5656 push.device_types = ua.device_types(' ios' , ' android' )
@@ -72,15 +72,15 @@ Example usage:
7272 import urbanairship as ua
7373
7474 # Initialize with OAuth credentials
75- airship = ua.client.OAuthClient(
75+ client = ua.client.OAuthClient(
7676 key = ' <app key>' ,
7777 client_id = ' <client id>' ,
7878 private_key = ' <private key>' ,
7979 scope = [' push:write' , ' channels:read' ] # Optional scopes
8080 )
8181
8282 # Create and send a push notification
83- push = airship.create_push( )
83+ push = ua.Push(client )
8484 push.audience = ua.all_
8585 push.notification = ua.notification(alert = ' Hello, world!' )
8686 push.device_types = ua.device_types(' ios' , ' android' )
0 commit comments