@@ -25,6 +25,7 @@ ipfs-api
2525- [ Install] ( #install )
2626 - [ Running the daemon with the right port] ( #running-the-daemon-with-the-right-port )
2727 - [ Importing the module and usage] ( #importing-the-module-and-usage )
28+ - [ Importing a sub-module and usage] ( #importing-a-sub-module-and-usage )
2829 - [ In a web browser through Browserify] ( #in-a-web-browser-through-browserify )
2930 - [ In a web browser from CDN] ( #in-a-web-browser-from-cdn )
3031 - [ CORS] ( #cors )
@@ -74,6 +75,14 @@ var ipfs = ipfsAPI('/ip4/127.0.0.1/tcp/5001')
7475// or using options
7576var ipfs = ipfsAPI ({host: ' localhost' , port: ' 5001' , protocol: ' http' })
7677```
78+ ### Importing a sub-module and usage
79+ ``` javascript
80+ const bitswap = require (' ipfs-api/src/bitswap' )(' /ip4/127.0.0.1/tcp/5001' )
81+
82+ bitswap .unwant (key, (err ) => {
83+ // ...
84+ }
85+ ` ` `
7786
7887### In a web browser through Browserify
7988
@@ -224,12 +233,15 @@ This means:
224233- [` ipfs .id ([callback])` ](https://github.com/ipfs/interface-ipfs-core/tree/master/API/generic#id)
225234- [` ipfs .version ([callback])` ](https://github.com/ipfs/interface-ipfs-core/tree/master/API/generic#version)
226235- [` ipfs .ping ()` ](https://github.com/ipfs/interface-ipfs-core/tree/master/API/generic#ping)
227- - [ ` ipfs.log() ` ] ( https://github.com/ipfs/interface-ipfs-core/tree/master/API/generic#log )
228236
229- #### [ key] ( https://github.com/ipfs/interface-ipfs-core/tree/master/API/key )
237+ - log:
238+ - [` ipfs .log .ls ([callback])` ](https://github.com/ipfs/interface-ipfs-core/tree/master/API/generic)
239+ - [` ipfs .log .tail ([callback])` ](https://github.com/ipfs/interface-ipfs-core/tree/master/API/generic)
240+ - [` ipfs .log .level (subsystem, level, [options, callback])` ](https://github.com/ipfs/interface-ipfs-core/tree/master/API/generic)
230241
231- - [ ` ipfs.key.gen(name, [options, callback]) ` ] ( https://github.com/ipfs/interface-ipfs-core/tree/master/API/key#gen )
232- - [ ` ipfs.key.list([options, callback]) ` ] ( https://github.com/ipfs/interface-ipfs-core/tree/master/API/key#list )
242+ - key:
243+ - [` ipfs .key .gen (name, [options, callback])` ](https://github.com/ipfs/interface-ipfs-core/tree/master/API/key#gen)
244+ - [` ipfs .key .list ([options, callback])` ](https://github.com/ipfs/interface-ipfs-core/tree/master/API/key#list)
233245
234246##### [name](https://github.com/ipfs/interface-ipfs-core/tree/master/API/name)
235247
0 commit comments