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

Flesh out pubsub topics #742

Merged
merged 10 commits into from
Mar 19, 2015
Merged

Flesh out pubsub topics #742

merged 10 commits into from
Mar 19, 2015

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Mar 18, 2015

Following #691.

  • Updates the API docs slightly (making batching explicit).
  • Adds a connection lifted from gcloud.storage.connection.
  • Adds Topic class and list_topics API function.

Does not handle implicit connection / project ID stuff (which should be shared, as called for in #741).

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.
@tseaver tseaver added the api: pubsub Issues related to the Pub/Sub API. label Mar 18, 2015
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 18, 2015

>>> 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.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling cf8b9fa on tseaver:691-flesh_out_pubsub_topics into aa684be on GoogleCloudPlatform:master.

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.

This comment was marked as spam.

""" 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.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 9cd9cf6 on tseaver:691-flesh_out_pubsub_topics into aa684be on GoogleCloudPlatform:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 703d56b on tseaver:691-flesh_out_pubsub_topics into aa684be on GoogleCloudPlatform:master.

@tseaver
Copy link
Contributor Author

tseaver commented Mar 19, 2015

@dhermes, any remaining issues? I could merge here and then you could work on refactoring the connection stuff.

@dhermes
Copy link
Contributor

dhermes commented Mar 19, 2015

LGTM

tseaver added a commit that referenced this pull request Mar 19, 2015
@tseaver tseaver merged commit 01d697e into googleapis:master Mar 19, 2015
@tseaver tseaver deleted the 691-flesh_out_pubsub_topics branch March 19, 2015 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants