diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index d300b96a8..fdea342db 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-pubsub==0.32.0 +google-cloud-pubsub==0.32.1 diff --git a/samples/snippets/subscriber.py b/samples/snippets/subscriber.py index f03039bbc..827dcd313 100644 --- a/samples/snippets/subscriber.py +++ b/samples/snippets/subscriber.py @@ -29,11 +29,11 @@ def list_subscriptions_in_topic(project, topic_name): """Lists all subscriptions for a given topic.""" - subscriber = pubsub_v1.SubscriberClient() + subscriber = pubsub_v1.PublisherClient() topic_path = subscriber.topic_path(project, topic_name) - for subscription in subscriber.list_subscriptions(topic_path): - print(subscription.name) + for subscription in subscriber.list_topic_subscriptions(topic_path): + print(subscription) def list_subscriptions_in_project(project):