-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.api: cloudresourcemanagerIssues related to the Resource Manager API.Issues related to the Resource Manager API.api: coreapi: dnsIssues related to the Cloud DNS API.Issues related to the Cloud DNS API.api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.
Description
gcloud.iterator.Iterator is a base class, relying on a path for the API method. I think it would be clearer if it wrapped around a method of a client (or other domain object), where that method takes page_token, page_size, etc., along with other named arguments in **kw. We could then ditch all the derived classes, and just use the one, common implementation. E.g.:
from gcloud.iterator import Iterator
from gcloud.pubsub import Client
client = Client()
topics = list(Iterator(client.list_topics))
subs = list(Iterator(client.list_subscriptions, topic_name='my-topic'))Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.api: cloudresourcemanagerIssues related to the Resource Manager API.Issues related to the Resource Manager API.api: coreapi: dnsIssues related to the Cloud DNS API.Issues related to the Cloud DNS API.api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.