This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: | ||
|