Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit fa784b3

Browse files
committed
feat(pinning): add pin.add spec
1 parent 0939790 commit fa784b3

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

API/pinning-api/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,58 @@
11
pinning API
22
===========
33

4+
#### `add`
5+
6+
> Pin an IPFS object to local storage
7+
8+
##### `Go` **WIP**
9+
10+
##### `JavaScript` - ipfs.pin.add(hash, [options, callback])
11+
12+
Where:
13+
14+
- `hash` is an IPFS multihash.
15+
- `options` is an object that can contain the following keys:
16+
- `recursive` - Recursevely pin the object linked.
17+
18+
`callback` must follow `function (err) {}` signature, where `err` is an error if the operation was not successful.
19+
20+
If no `callback` is passed, a promise is returned.
21+
22+
Example:
23+
24+
```JavaScript
25+
ipfs.pin.add(hash, function (err) {})
26+
```
27+
28+
29+
#### `ls`
30+
31+
>
32+
33+
##### `Go` **WIP**
34+
35+
##### `JavaScript` - ipfs.SOMETHING(data, [callback])
36+
37+
`callback` must follow `function (err, res) {}` signature, where `err` is an error if the operation was not successful. `res` will be an array of:
38+
39+
If no `callback` is passed, a promise is returned.
40+
41+
Example:
42+
43+
44+
45+
#### `rm`
46+
47+
>
48+
49+
##### `Go` **WIP**
50+
51+
##### `JavaScript` - ipfs.SOMETHING(data, [callback])
52+
53+
`callback` must follow `function (err, res) {}` signature, where `err` is an error if the operation was not successful. `res` will be an array of:
54+
55+
If no `callback` is passed, a promise is returned.
56+
57+
Example:
58+

0 commit comments

Comments
 (0)