def topic_subscription_push(client, to_delete):
 TOPIC_NAME = ('topic_subscription_push-%d' % (_millis(),))
 SUB_PUSH = ('topic_subscription_push-sub-%d' % (_millis(),))
 PUSH_URL = 'https://api.example.com/push-endpoint'
 topic = client.topic(TOPIC_NAME)
 topic.create()
 to_delete.append(topic)
 subscription = topic.subscription(SUB_PUSH, push_endpoint=PUSH_URL)
 subscription.create()
 subscription.modify_push_configuration(push_endpoint=None)
 subscription.modify_push_configuration(push_endpoint=PUSH_URL)

def topic_subscription_push ( client , to_delete ) : TOPIC_NAME = ( 'topic_subscription_push-%d' % ( _millis ( ) , ) ) SUB_PUSH = ( 'topic_subscription_push-sub-%d' % ( _millis ( ) , ) ) PUSH_URL = 'https://api.example.com/push-endpoint' topic = client . topic ( TOPIC_NAME ) topic . create ( ) to_delete . append ( topic ) subscription = topic . subscription ( SUB_PUSH , push_endpoint = PUSH_URL ) subscription . create ( ) subscription . modify_push_configuration ( push_endpoint = None ) subscription . modify_push_configuration ( push_endpoint = PUSH_URL )
create subscriptions to a topic .