Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

samples: add samples for subscription with filtering#1492

Merged
feywind merged 5 commits intogoogleapis:mainfrom
feywind:gh1029-samples
Feb 23, 2022
Merged

samples: add samples for subscription with filtering#1492
feywind merged 5 commits intogoogleapis:mainfrom
feywind:gh1029-samples

Conversation

@feywind
Copy link
Copy Markdown
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 February 16, 2022 22:36
@snippet-bot
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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