bfx-api-node-rest
Advanced tools
Comparing version 3.0.19 to 3.1.0
@@ -1634,2 +1634,39 @@ 'use strict' | ||
/** | ||
* @param {object} params - parameters | ||
* @param {string} params.parent - the parent id of the Pulse message | ||
* @param {string} params.content - content of your Pulse message | ||
* @param {number} params.isPublic - make Pulse message public | ||
* @param {string} params.isPin - make Pulse message pinned | ||
* @param {string} params.attachments - Base64 encoded list of strings | ||
* @param {Function} [cb] - callback | ||
* @returns {Promise} p | ||
* @see https://docs.bitfinex.com/reference#rest-auth-pulse-add | ||
*/ | ||
addPulseComment (params, cb) { | ||
const { parent = '' } = params || {} | ||
if (_isEmpty(parent)) { | ||
return this._cb(new Error('parent (pulse id value) is required for adding comments'), null, cb) | ||
} | ||
return this.addPulse(params, cb) | ||
} | ||
/** | ||
* @param {object} params - parameters | ||
* @param {string} params.parent - the parent id of the Pulse message | ||
* @param {number} params.isPublic - fetched public comments of a pulse | ||
* @param {string} params.limit - number of comments | ||
* @param {string} params.end - fetch comments starting from a given time in milliseconds | ||
* @param {Function} [cb] - callback | ||
* @returns {Promise} p | ||
* @see https://docs.bitfinex.com/reference#rest-public-pulse-hist | ||
*/ | ||
fetchPulseComments (params, cb) { | ||
const { parent = '' } = params || {} | ||
if (_isEmpty(parent)) { | ||
return this._cb(new Error('parent (pulse id value) is required for fetching comments'), null, cb) | ||
} | ||
return this.pulseHistory(params, cb) | ||
} | ||
/** | ||
* @param {object} params - parameters | ||
@@ -1636,0 +1673,0 @@ * @param {string} params.pid - pulse id |
{ | ||
"name": "bfx-api-node-rest", | ||
"version": "3.0.19", | ||
"version": "3.1.0", | ||
"description": "Official Bitfinex REST v1 & v2 API interfaces", | ||
@@ -37,3 +37,4 @@ "engines": { | ||
"Paolo Ardoino <paolo@bitfinex.com> (https://www.bitfinex.com)", | ||
"Jacob Plaster <jacob.plaster@bitfinex.com> (https://www.bitfinex.com)" | ||
"Jacob Plaster <jacob.plaster@bitfinex.com> (https://www.bitfinex.com)", | ||
"Abhishek Shrestha <abhishek.shrestha@bitfinex.com> (https://www.bitfinex.com)" | ||
], | ||
@@ -70,3 +71,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"bfx-api-node-models": "^1.2.9", | ||
"bfx-api-node-models": "^1.3.1", | ||
"bfx-api-node-util": "^1.0.4", | ||
@@ -73,0 +74,0 @@ "bluebird": "^3.5.5", |
@@ -76,2 +76,4 @@ /* eslint-env mocha */ | ||
testMethod('addPulse', '/auth/w/pulse/add', '_makeAuthRequest') | ||
testMethod('addPulseComment', '/auth/w/pulse/add', '_makeAuthRequest', { parent: 'parent', content: 'content' }) | ||
testMethod('fetchPulseComments', '/auth/r/pulse/hist', '_makeAuthRequest', { parent: 'parent' }) | ||
testMethod('deletePulse', '/auth/w/pulse/del', '_makeAuthRequest') | ||
@@ -78,0 +80,0 @@ testMethod('publicPulseHistory', '/pulse/hist?limit=2&end=1589559090651', '_makePublicRequest', 2, 1589559090651) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1810639
3890
5
Updatedbfx-api-node-models@^1.3.1