-
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
Flesh out pubsub topics #742
Flesh out pubsub topics #742
Conversation
Copied from 'storage.connection.Connection', with storage-specific bits (e.g., upload) removed.
Include 'create', 'delete', 'exists', and 'publish' methods. Inclue 'pubsub.topic.Topic.batch', which allows publishing multiple messages to a topic as a single API request.
|
||
>>> from gcloud.pubsub.topic import Topic | ||
>>> topic = Topic('topic_name') | ||
>>> topic.create() # API request |
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.
path = '/projects/%s/topics' % project | ||
if params: | ||
return connection.api_request(method='GET', path=path, | ||
query_params=params) |
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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
""" Define API functions (not bound to classes).""" | ||
|
||
|
||
def list_topics(page_size=None, page_token=None, |
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.
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.
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.
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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@dhermes, any remaining issues? I could merge here and then you could work on refactoring the connection stuff. |
LGTM |
Following #691.
gcloud.storage.connection
.Topic
class andlist_topics
API function.Does not handle implicit connection / project ID stuff (which should be shared, as called for in #741).