diff --git a/README.md b/README.md index e39bb0350..95aac232e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ IPFS API wrapper library in JavaScript ====================================== -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) [![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) [![](https://img.shields.io/badge/freejs-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) [![Dependency Status](https://david-dm.org/ipfs/js-ipfs-api.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-api) [![Circle CI](https://circleci.com/gh/ipfs/js-ipfs-api.svg?style=svg)](https://circleci.com/gh/ipfs/js-ipfs-api) +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) [![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) [![](https://img.shields.io/badge/freejs-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) +[![Dependency Status](https://david-dm.org/ipfs/js-ipfs-api.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-api) +[![Travis CI](https://travis-ci.org/ipfs/js-ipfs-api.svg?branch=master)](https://travis-ci.org/ipfs/js-ipfs-api) +[![Circle CI](https://circleci.com/gh/ipfs/js-ipfs-api.svg?style=svg)](https://circleci.com/gh/ipfs/js-ipfs-api) > A client library for the IPFS API. @@ -68,7 +71,7 @@ array of files can be used. ```javascript ipfs.add(files, function(err, res) { if(err || !res) return console.error(err) - + res.forEach(function(file) { console.log(file.Hash) console.log(file.Name) @@ -111,7 +114,7 @@ Retrieve the contents of a single hash, or array of hashes. ```javascript ipfs.cat(hashs, function(err, res) { if(err || !res) return console.error(err) - + if(res.readable) { // Returned as a stream res.pipe(process.stdout) @@ -138,7 +141,7 @@ Get the node structure of a hash. Included in it is a hash and array to links. ```javascript ipfs.ls(hashs, function(err, res) { if(err || !res) return console.error(err) - + res.Objects.forEach(function(node) { console.log(node.Hash) console.log("Links [%d]", node.Links.length) @@ -158,7 +161,7 @@ curl "http://localhost:5001/api/v0/ls?arg=&stream-channels=true" ```js { Objects: [ - { + { Hash: string, Links: [{ Name: string,