Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'Bucket.list_notifications' API wrapper. #3990

Merged
merged 3 commits into from
Sep 21, 2017
Merged

Add 'Bucket.list_notifications' API wrapper. #3990

merged 3 commits into from
Sep 21, 2017

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Sep 18, 2017

Uses #3983 as a base.

Toward #3956.

@tseaver tseaver added api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Sep 18, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 18, 2017
@@ -405,6 +424,30 @@ def list_blobs(self, max_results=None, page_token=None, prefix=None,
iterator.prefixes = set()
return iterator

def list_notifications(self, client=None):
"""List pubsub notifications for this bucket.

This comment was marked as spam.

This comment was marked as spam.

:returns: the new notification instance
:raises ValueError:
if resource is missing 'topic' key, or if it is not formatted
per documented spec.

This comment was marked as spam.

This comment was marked as spam.

match = _TOPIC_REF_RE.match(topic_path)
if match is None:
raise ValueError(
'Resource has invalid topic: {}'.format(topic_path))

This comment was marked as spam.

This comment was marked as spam.

@tseaver
Copy link
Contributor Author

tseaver commented Sep 21, 2017

@dhermes Any remaining issues?

Copy link
Contributor

@dhermes dhermes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tseaver tseaver merged commit 9eb9a46 into googleapis:3956-storage-notifications Sep 21, 2017
@tseaver tseaver deleted the 3956-storage-notifications-bucket-list_notifications branch September 21, 2017 19:15
tseaver added a commit that referenced this pull request Sep 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants