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

samples: add samples for subscription with filtering #1492

Merged
merged 5 commits into from
Feb 23, 2022

Conversation

feywind
Copy link
Collaborator

@feywind feywind commented Feb 16, 2022

Adds TS and JS samples for creating a subscription with a filtering string.

Fixes #1029 🦕

@feywind feywind requested review from a team as code owners February 16, 2022 22:36
@snippet-bot
Copy link

snippet-bot bot commented Feb 16, 2022

Here is the summary of changes.

You are about to add 2 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added api: pubsub Issues related to the googleapis/nodejs-pubsub API. samples Issues that are directly related to samples. labels Feb 16, 2022
@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 16, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 16, 2022
*/
// const topicNameOrId = 'YOUR_TOPIC_NAME_OR_ID';
// const subscriptionNameOrId = 'YOUR_SUBSCRIPTION_NAME_OR_ID';
// const filterString = 'YOUR_FILTER_STRING';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we give an example here like we do in the Java samples?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's unclear to me since I don't want to give the impression, compared to the other default strings, that there's a "correct" filter to put there. I might add the sample filter as a comment after the rest of it...?

Copy link
Contributor

@anguillanneuf anguillanneuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit but LGTM otherwise.

Just FYI, we are currently not tracking Typescript in SnippetTracker because they aren't published on c.g.c. so the region tags aren't being used.

*/
// const topicNameOrId = 'YOUR_TOPIC_NAME_OR_ID';
// const subscriptionNameOrId = 'YOUR_SUBSCRIPTION_NAME_OR_ID';
// const filterString = 'YOUR_FILTER_STRING';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Yeah, I'm aware about the lack of TS tracking right now... it's something I would like to figure out, but for now I just want the samples to exist for users to find, and so we have them for later if we do that.

@generated-files-bot
Copy link

Warning: This pull request is touching the following templated files:

@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 23, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 23, 2022
@feywind feywind added the automerge Merge the pull request once unit tests and other checks pass. label Feb 23, 2022
@feywind feywind merged commit f3aec70 into googleapis:main Feb 23, 2022
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Feb 23, 2022
@feywind feywind deleted the gh1029-samples branch February 23, 2022 20:45
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 googleapis/nodejs-pubsub API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add samples for RetryPolicy and filtering
3 participants