From fa784b337333fea37f54813e771b4a6325e1d8d9 Mon Sep 17 00:00:00 2001 From: David Dias Date: Tue, 9 Aug 2016 08:44:59 +0100 Subject: [PATCH] feat(pinning): add pin.add spec --- API/pinning-api/README.md | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/API/pinning-api/README.md b/API/pinning-api/README.md index 8ac8c7d8..9c37b201 100644 --- a/API/pinning-api/README.md +++ b/API/pinning-api/README.md @@ -1,3 +1,58 @@ pinning API =========== +#### `add` + +> Pin an IPFS object to local storage + +##### `Go` **WIP** + +##### `JavaScript` - ipfs.pin.add(hash, [options, callback]) + +Where: + +- `hash` is an IPFS multihash. +- `options` is an object that can contain the following keys: + - `recursive` - Recursevely pin the object linked. + +`callback` must follow `function (err) {}` signature, where `err` is an error if the operation was not successful. + +If no `callback` is passed, a promise is returned. + +Example: + +```JavaScript +ipfs.pin.add(hash, function (err) {}) +``` + + +#### `ls` + +> + +##### `Go` **WIP** + +##### `JavaScript` - ipfs.SOMETHING(data, [callback]) + +`callback` must follow `function (err, res) {}` signature, where `err` is an error if the operation was not successful. `res` will be an array of: + +If no `callback` is passed, a promise is returned. + +Example: + + + +#### `rm` + +> + +##### `Go` **WIP** + +##### `JavaScript` - ipfs.SOMETHING(data, [callback]) + +`callback` must follow `function (err, res) {}` signature, where `err` is an error if the operation was not successful. `res` will be an array of: + +If no `callback` is passed, a promise is returned. + +Example: +