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

Commit

Permalink
chore(): update Readme
Browse files Browse the repository at this point in the history
add examples for creating/reading a CID
  • Loading branch information
kenshyx committed Jan 11, 2019
1 parent ba52f3d commit 6284cbe
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Expand Up @@ -33,16 +33,17 @@ instance.start().then((api) => {});
instance.stop()

// see api docs
// add data to ipfs
instance.api.add(object | Buffer)
// add/get data to ipfs
// cid zdpuB2CAUgUbyJ4s8SmqcGGaGfs7bG337dDNty8NSCR3fhgRw
const cid = instance.api.add({firstName: 'John', lastName: 'Doe'});
//returns John
instance.api.get(cid, '/firstName');

// read data from ipfs
instance.api.get('ipfs hash')
instance.api.ipfsApi.cat('ipfs hash')

// resolve ipfs hash object paths(see tests)

// access default js-ipfs-api from
instance.api.apiClient
// access default ipfs-http-api from
instance.api.ipfsApi
```
### Dev
```
Expand Down

0 comments on commit 6284cbe

Please sign in to comment.