IPFS API for kotlin to access a IPFS node via http
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ligi 2c8577ff6b
Correct package for example
2 days ago
.ci Use new koninuum config format 3 years ago
.github Upgrade to GitHub-native Dependabot 2 years ago
buildSrc Add simple example project 3 years ago
example Correct package for example 2 days ago
gradle/wrapper Use gradle 6.4 3 years ago
lib Be compatible with go-ipfs 0.5.0 3 years ago
.gitignore Add for directories 6 years ago
Jenkinsfile Add Jenkinsfile 7 years ago
README.md Fix nullability problem 11 months ago
build.gradle.kts Bump assertj-core from 3.22.0 to 3.23.1 10 months ago
gradlew Use gradle 6.4 3 years ago
gradlew.bat Add simple example project 3 years ago
settings.gradle Add simple example project 3 years ago

README.md

IPFS API for kotlin to access a IPFS node via http

Release

Get it

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 {
  implementation 'com.github.ligi:ipfs-api-kotlin:$current_version'
}

Use it with kotlin

add a string

val multihash = LocalIPFS().add.string("test-string").Hash

get a string

val content = LocalIPFS().get.cat(multihash)

get commit from version

val commit = LocalIPFS().info.version()?.Commit

Note: when you are not running a local IPFS daemon you can also use infura just replace LocalIPFS() with InfuraIPFS() or write your own configuration.

Apps that use this library

Please send a message or even PR if you write/find an app that also uses this library.

Dependencies

We depend on okhttp and moshi which play well together with okio

License

MIT