kevinohara80 / nforce

nforce is a node.js salesforce REST API wrapper for force.com, database.com, and salesforce.com
MIT License
474 stars 167 forks source link

How can I invoke /services/data/v41.0/sobjects/StreamingChannel/0M636000000PAswCAG/push #146

Closed dkoon777 closed 6 years ago

dkoon777 commented 6 years ago

Your ApexRest API only handles /services/apexrest/.. kind of endpoint, I need to communicate to /services/data/v41.0/sobjects/StreamingChannel/0M636000000PAswCAG/push endpoint, how?

kevinohara80 commented 6 years ago

There is currently not first-class support for pushing events right now. I did, however, add low-level REST methods that you can use. Prior there was only a getUrl() method but now there is a putUrl(), postUrl(), 'deleteUrl()` methods.

Something like this should work

org.postUrl({
  url: '/services/data/v41.0/sobjects/StreamingChannel/0M636000000PAswCAG/push',
  body: { .... }
})

Happy to entertain a pull request to make pushing to event topics first-class. In the meantime, if you upgrade to the latest nforce you'll get these new methods.