IPFS API for kotlin to access a IPFS node via http
You can get the artifact via jitpack - here you see how to use with gradle - for other build systems have a look here
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.ligi:ipfs-api-kotlin:$current_version'
}
val multihash = IPFS().add.string("test-string").Hash
val content = IPFS().get.cat(multihash)
val commit = IPFS().info.version().Commit
you can also use it from java - but it is more verbose:
final String multihash = new IPFS().getAdd().string("test-string").getHash();
Please send a message or even PR if you write/find an app that also uses this library.
We depend on okhttp and moshi which play well together with okio
MIT