Skip to content

Commit

Permalink
Merge pull request #894 from tseaver/pubsub-api_usage_fixup
Browse files Browse the repository at this point in the history
Fix up pubsub API docs to show returned 'next_page_token'.
  • Loading branch information
tseaver committed May 26, 2015
2 parents 2bf11ca + 0d5b1ce commit 6cf0852
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/pubsub-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ List topics for the default project:
.. doctest::

>>> from gcloud.pubsub import list_topics
>>> [topic.name for topic in list_topics()] # API request
>>> topics, next_page_token = list_topics() # API request
>>> [topic.name for topic in topics]
['topic_name']

List topics for an explicit project:

.. doctest::

>>> from gcloud.pubsub import list_topics
>>> topics = list_topics(project='my.project') # API request
>>> topics, next_page_token = list_topics(project='my.project') # API request
>>> [topic.name for topic in topics]
['topic_name']

Expand Down Expand Up @@ -181,7 +182,7 @@ List subscriptions for a topic:

>>> from gcloud.pubsub import Topic
>>> topic = Topic('topic_name')
>>> subscriptions = topic.list_subscriptions() # API request
>>> subscriptions, next_page_token = topic.list_subscriptions() # API request
>>> [subscription.name for subscription in subscriptions]
['subscription_name']

Expand All @@ -190,7 +191,7 @@ List all subscriptions for the default project:
.. doctest::

>>> from gcloud.pubsub import list_subscriptions
>>> subscriptions = list_subscriptions() # API request
>>> subscription, next_page_tokens = list_subscriptions() # API request
>>> [subscription.name for subscription in subscriptions]
['subscription_name']

Expand Down

0 comments on commit 6cf0852

Please sign in to comment.