Updating list_sinks() to Iterator pattern.#2652
Merged
Merged
Conversation
Contributor
Author
|
@tseaver @daspecster PTAL this is ready to go |
d4cd270 to
035ec7f
Compare
daspecster
reviewed
Oct 31, 2016
|
|
||
| :type resource: dict | ||
| :param resource: one entry resource from API response | ||
| :param resource: One entry resource from API response. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
daspecster
reviewed
Oct 31, 2016
| token = iterator.next_page_token | ||
|
|
||
| self.assertEqual(sinks, RETURNED['sinks']) | ||
| # First check the token. |
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.
Contributor
|
This LGTM as well. |
035ec7f to
c351c05
Compare
tseaver
reviewed
Nov 1, 2016
| token = iterator.next_page_token | ||
|
|
||
| self.assertEqual(sinks, SINKS) | ||
| # First check the token. |
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.
tseaver
reviewed
Nov 1, 2016
| iterator = client.list_sinks() | ||
| page = six.next(iterator.pages) | ||
| sinks = list(page) | ||
| token = iterator.next_page_token |
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.
richkadel
pushed a commit
to richkadel/google-cloud-python
that referenced
this pull request
May 6, 2017
Updating list_sinks() to Iterator pattern.
parthea
pushed a commit
that referenced
this pull request
Nov 24, 2025
Updating list_sinks() to Iterator pattern.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: Has #2651 as diffbase. Unit test changes will be forthcoming.