ferristseng / rust-ipfs-api

IPFS HTTP client in Rust
Apache License 2.0
247 stars 68 forks source link

Dag API #57

Closed SionoiS closed 4 years ago

SionoiS commented 4 years ago

Hello!

I really like your API but I needed to use dag put and dag get with custom objects.

Your dag get only worked for unixfs(correct name?) nodes, so I changed it to return a string instead so that the user can deserialize to whatever they want.

I un-commented the dag put and changed the response struct to the docs specs.

I also added an example.

Let me know what you think!

SionoiS commented 4 years ago

For the example I copy-pasted some things from tar_add, works great.

Dag get is now returning a stream of bytes.