ipfs / go-ipfs-api

The go interface to ipfs's HTTP API
MIT License
455 stars 178 forks source link

Examples? #71

Open jbenet opened 6 years ago

jbenet commented 6 years ago

Are there usage examples? dont see any in the repo

jcaesar commented 6 years ago

Some examples would indeed be greatly appreciated, as everything I try just gives me a SIGSEGV…

E.g.:

package main

import "github.com/ipfs/go-ipfs-api"

func main() {
    shell.NewLocalShell().FileList("/ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv")
}
bonedaddy commented 6 years ago

the following package can be used as examples on how to use this library (there are also accompanying tests) however it uses a fork of go-ipfs-api but the examples none the less should be usable with the non fork (aka, the repository hosting this issue)

https://github.com/RTradeLtd/rtfs/blob/616e741a37e440d760448331b8fc93fb87498a19/rtfs.go#L158

magik6k commented 5 years ago

https://github.com/OpenBazaar/openbazaar-go https://github.com/textileio/textile-go

Those two projects use go-ipfs directly, and don't appear to use this repo

moon004 commented 5 years ago

Owh @magik6k , my bad. I'll remove it.