GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fixing non working example with publish by khaosdoctor · Pull Request #471 · GoogleCloudPlatform/nodejs-docs-samples

Conversation

@khaosdoctor

@khaosdoctor khaosdoctor commented Aug 31, 2017

Copy link
Copy Markdown

Publish example was not working, so I updated it to the new API (because I needed to read the source code to understand this part), so it's easier for us to use the docs.

Here's my code as an example:

publisher.js

const PubSub = require('@google-cloud/pubsub')
const chalk = require('chalk')

function run () {
  console.log(chalk.bold.cyan('Publishing Message...'))
  return PubSub().topic('my-topic').publisher().publish(new Buffer.from(process.argv.pop()))
    .then((results) => {
      console.log(`Message ${chalk.bold.green(results.shift())} published`)
      return results
    })
    .catch(console.error)
}

run()

Use it like node publisher.js <mydata>

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@khaosdoctor
Fixing non working example with publish
b3e6b66
Publish example was not working, so I updated it to the new API (because I needed to read the source code to understand this part), so it's easier for us to use the docs.

Here's my code as an example:

> publisher.js
```js
const PubSub = require('@google-cloud/pubsub')
const chalk = require('chalk')

function run () {
  console.log(chalk.bold.cyan('Publishing Message...'))
  return PubSub().topic('my-topic').publisher().publish(new Buffer.from(process.argv.pop()))
    .then((results) => {
      console.log(`Message ${chalk.bold.green(results.shift())} published`)
      return results
    })
    .catch(console.error)
}

run()
```

Use it like `node publisher.js <mydata>`
@googlebot

googlebot commented Aug 31, 2017

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@khaosdoctor

khaosdoctor commented Aug 31, 2017

Copy link
Copy Markdown
Author

I signed it!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@googlebot

googlebot commented Aug 31, 2017

Copy link
Copy Markdown

CLAs look good, thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ace-n

ace-n commented Aug 31, 2017

Copy link
Copy Markdown
Contributor

Thanks for the PR - but I think #464 already addresses these changes, so I'm closing this for now.

Feel free to comment/reopen if that's not the case.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ace-n ace-n closed this Aug 31, 2017
@khaosdoctor

khaosdoctor commented Sep 1, 2017

Copy link
Copy Markdown
Author

Yeah! That's the stuff lol we even used the same variable names 🤣 thanks @ace-n!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@khaosdoctor
khaosdoctor deleted the patch-1 branch September 1, 2017 00:05
NimJay pushed a commit that referenced this pull request Nov 11, 2022
@release-please
chore: release 2.4.2 (#472)
09f34af
🤖 I have created a release \*beep\* \*boop\*
---
### [2.4.2](https://www.github.com/googleapis/nodejs-kms/compare/v2.4.1...v2.4.2) (2021-06-29)


### Bug Fixes

* **deps:** google-gax v2.17.0 with mTLS ([#471](https://www.github.com/googleapis/nodejs-kms/issues/471)) ([9841f22](https://www.github.com/googleapis/nodejs-kms/commit/9841f227e64da2ee6158b6c43a0339c2b1fa8e3a))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
ace-n pushed a commit that referenced this pull request Nov 11, 2022
@release-please Ace Nassri
chore: release 2.4.2 (#472)
d091cec
🤖 I have created a release \*beep\* \*boop\*
---
### [2.4.2](https://www.github.com/googleapis/nodejs-kms/compare/v2.4.1...v2.4.2) (2021-06-29)


### Bug Fixes

* **deps:** google-gax v2.17.0 with mTLS ([#471](https://www.github.com/googleapis/nodejs-kms/issues/471)) ([9841f22](https://www.github.com/googleapis/nodejs-kms/commit/9841f227e64da2ee6158b6c43a0339c2b1fa8e3a))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
unforced pushed a commit that referenced this pull request Nov 17, 2022
@release-please
chore(main): release 5.10.0 (#471)
b3af98e
🤖 I have created a release *beep* *boop*
---


## [5.10.0](googleapis/nodejs-security-center@v5.9.0...v5.10.0) (2022-04-11)


### Features

* Add iam_binding field to findings attributes. It represents particular IAM bindings, which captures a member's role addition, removal, or state ([#474](googleapis/nodejs-security-center#474)) ([b29893c](googleapis/nodejs-security-center@b29893c))
* Add next_steps field to finding's list of attributes ([#476](googleapis/nodejs-security-center#476)) ([326e8d2](googleapis/nodejs-security-center@326e8d2))
* AuditConfig for IAM v1 ([#470](googleapis/nodejs-security-center#470)) ([2ec070f](googleapis/nodejs-security-center@2ec070f))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
@unforced unforced mentioned this pull request Nov 17, 2022
migrate code from googleapis/nodejs-security-center #2867
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@khaosdoctor @googlebot @ace-n
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.