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

Commit

Permalink
feat(pinning): add pin.add spec
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Aug 15, 2016
1 parent 0939790 commit fa784b3
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions API/pinning-api/README.md
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:

0 comments on commit fa784b3

Please sign in to comment.