-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add 'Bucket.list_notifications' API wrapper. #3990
Conversation
@@ -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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
: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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@dhermes Any remaining issues? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Uses #3983 as a base.
Toward #3956.