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

Commit da8c2ce

Browse files
Merge pull request #16 from ipfs/revert-15-blocks
Revert "draft api docs for blocks"
2 parents e9c15c2 + 7f6ed7c commit da8c2ce

File tree

1 file changed

+4
-73
lines changed

1 file changed

+4
-73
lines changed

README.md

Lines changed: 4 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -54,78 +54,6 @@ test.all(common)
5454

5555
A valid (read: that follows this interface) IPFS core implementation, must expose the following API.
5656

57-
## Block
58-
59-
### `block.put`
60-
61-
> Create a new IPFS Block.
62-
63-
##### `Go` **WIP**
64-
65-
##### `JavaScript` - ipfs.block.put(data, [callback])
66-
67-
Where `data` can be a
68-
69-
- Buffer, requiring that the encoding is specified on the options. If no
70-
encoding is specified, Buffer is treated as the Data field
71-
- [Block][] instance
72-
73-
`callback` has the signature `function (err, block) {}`, where `err` is an error
74-
if the operation was not successful. and `block` is a [Block][].
75-
76-
77-
78-
79-
### `block.get`
80-
81-
> Retrieve an IPFS Block from the underlying Block Store by its mulithash.
82-
83-
##### `Go` **WIP**
84-
85-
##### `JavaScript` - ipfs.block.get(multihash, [callback])
86-
87-
`multihash` is a [multihash][] which can be passed as a
88-
89-
- Buffer, the raw Buffer of the multihash (or of and encoded version)
90-
- String, the toString version of the multihash (or of an encoded version)
91-
92-
`callback` must follow the signature `function (err, node) {}`, where `err` is
93-
an error if the operation was not successful and `block` is a [Block][].
94-
95-
If no `callback` is passed, a promise is returned.
96-
97-
98-
99-
100-
### `block.stat`
101-
102-
> Returns various stats of an IPFS Block
103-
104-
##### `Go` **WIP**
105-
106-
##### `JavaScript` - ipfs.block.stat(multihash, [options, callback])
107-
108-
`multihash` is a [multihash][] which can be passed as:
109-
110-
- Buffer, the raw Buffer of the multihash (or of and encoded version)
111-
- String, the toString version of the multihash (or of an encoded version)
112-
113-
`callback` must follow the signature `function (err, stats) {}`, where `err` is
114-
an error if the operation was not successful and `stats` is an object with
115-
the format
116-
117-
```JavaScript
118-
{
119-
Key: 'QmPTkMuuL6PD8L2SwTwbcs1NPg14U8mRzerB1ZrrBrkSDD',
120-
Size: 10
121-
}
122-
```
123-
124-
If no `callback` is passed, a promise is returned.
125-
126-
127-
128-
12957
## Object
13058

13159
### `object.new`
@@ -191,6 +119,10 @@ If no `callback` is passed, a promise is returned.
191119

192120
If no `callback` is passed, a promise is returned.
193121

122+
### `object.data`
123+
124+
> Returns the Data field of an object
125+
194126
##### `Go` **WIP**
195127

196128
##### `JavaScript` - ipfs.object.data(multihash, [options, callback])
@@ -377,6 +309,5 @@ If no `callback` is passed, a promise is returned.
377309
If no `callback` is passed, a promise is returned.
378310

379311

380-
[Block]: https://github.com/ipfs/js-ipfs-block
381312
[DAGNode]: https://github.com/vijayee/js-ipfs-merkle-dag
382313
[multihash]: http://github.com/jbenet/multihash

0 commit comments

Comments
 (0)