-
Notifications
You must be signed in to change notification settings - Fork 296
Conversation
* | ||
* @memberof Api# | ||
* | ||
* @example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand our previous discussions, examples should make use of callbacks, not promises.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feel free to change
* @alias add | ||
* @method | ||
* @param {(Buffer|Stream|Array<Buffer|Stream>)} files - The content to add. | ||
* @param {function(Error, {hash: string})} [callback] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we get the file
in the callback rather than a String with the hash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add only returns the hash as far as I know
src/index.js
Outdated
* // or using options | ||
* const ipfs = ipfsAPI({host: 'localhost', port: '5001', procotol: 'http'}) | ||
*/ | ||
function Api (hostOrMultiaddr, port, opts) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this changed to just Api
from IpfsAPI
? Having ipfs in the name helps when dealing with stacktraces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't remember, feel free to change back
src/index.js
Outdated
* | ||
* @constructor Api | ||
* @param {string} hostOrMultiaddr | ||
* @param {number} port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Param says number but example is using string
Closing as this PR is significantly out of date and unlikely to be completed. |
Ref ipfs/js-ipfs#615
Preview: https://ipfs.github.io/js-ipfs-api/