komputing / ipfs-api-kotlin Goto Github PK
View Code? Open in Web Editor NEWIPFS API for kotlin to access a IPFS node via http
Home Page: http://ipfs.io
IPFS API for kotlin to access a IPFS node via http
Home Page: http://ipfs.io
Dependabot couldn't find a build.gradle for this project.
Dependabot requires a build.gradle to evaluate your project's current Java dependencies. It had expected to find one at the path: /build.gradle
.
If this isn't a Java project, or if it is a library, you may wish to disable updates for it from within Dependabot.
Do you have documentation?
Kotlin demands : val commit = LocalIPFS().info.version()!!.Commit
Add commands are currently executing synchronously which means it is not possible to call them from the UI thread.
Do you think it makes sense to add async support or since any operation will take over 100ms there is no point in initiating them on the UI thread?
Dependabot couldn't find a build.gradle for this project.
Dependabot requires a build.gradle to evaluate your project's current Java dependencies. It had expected to find one at the path: /build.gradle
.
If this isn't a Java project, or if it is a library, you may wish to disable updates for it from within Dependabot.
Dependabot couldn't find a build.gradle for this project.
Dependabot requires a build.gradle to evaluate your project's current Java dependencies. It had expected to find one at the path: /build.gradle
.
If this isn't a Java project, or if it is a library, you may wish to disable updates for it from within Dependabot.
Hey
having a moshi issue
in my build.gradle I was already using this:
// Kotlin KSP support
id("com.google.devtools.ksp") version "1.6.20-1.0.4"
// Json
implementation("com.squareup.moshi:moshi:1.13.0")
implementation("com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.6.20-1.0.4")
ksp("com.squareup.moshi:moshi-kotlin-codegen:1.13.0")
// IPFS
implementation("com.github.ligi:ipfs-api-kotlin:0.15")
Any idea how to solve this now I tried to add ipfs-api-kotlin?
val multiHash = LocalIPFS().add.string("hello").Hash
println(multiHash)
Cannot serialize Kotlin type io.ipfs.kotlin.model.NamedHash. Reflective serialization of Kotlin classes without using kotlin-reflect has undefined and unexpected behavior. Please use KotlinJsonAdapterFactory from the moshi-kotlin artifact or use code gen from the moshi-kotlin-codegen artifact.
Do you have plans to spin off a new release that includes the Get catBytes method? I see it in the repo but not in V 0.12 and would like to play around with it without cloning the whole repo.
Thanks!
I want to use IPFS on Android app with PubSub.
Specifically, I want to subscribe to a topic in the Android app.
What is required to add PubSub to this project?
Exception in thread "main" java.io.EOFException
at okio.RealBufferedSource.require(RealBufferedSource.java:59)
at okio.RealBufferedSource.readHexadecimalUnsignedLong(RealBufferedSource.java:284)
at okhttp3.internal.http.Http1xStream$ChunkedSource.readChunkSize(Http1xStream.java:437)
at okhttp3.internal.http.Http1xStream$ChunkedSource.read(Http1xStream.java:418)
at okio.RealBufferedSource$1.read(RealBufferedSource.java:409)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.readLine(BufferedReader.java:324)
at java.io.BufferedReader.readLine(BufferedReader.java:389)
at kotlin.io.LinesSequence$iterator$1.hasNext(ReadWrite.kt:74)
at kotlin.io.TextStreamsKt.forEachLine(ReadWrite.kt:154)
at kotlin.io.TextStreamsKt.readLines(ReadWrite.kt:37)
at io.ipfs.kotlin.commands.Add.addGeneric(Add.kt:73)
at io.ipfs.kotlin.commands.Add.directory(Add.kt:26)
at io.ipfs.kotlin.commands.Add.directory$default(Add.kt:26)
at kontinuum.WorkPackageProcessorKt.addIPFS(WorkPackageProcessor.kt:130)
at kontinuum.WorkPackageProcessorKt.doIn(WorkPackageProcessor.kt:125)
at kontinuum.WorkPackageProcessorKt.processWorkPackages(WorkPackageProcessor.kt:73)
at kontinuum.MainKt.main(Main.kt:30)
Hello,
I'd like to ask for a little help, please. I am trying to add a string to IPFS.
When I do:
IPFS(
base_url = "https://gateway.ipfs.io/api/v0/",
okHttpClient = OkHttpClient.Builder()
.addInterceptor(HttpLoggingInterceptor().apply {
level = HttpLoggingInterceptor.Level.BODY
})
.build()
)
.add
.string("Hello world.")
.Hash
Then it calls:
--> POST https://gateway.ipfs.io/api/v0/add?stream-channels=true&progress=false
Content-Type: multipart/form-data; boundary=f5f74a49-a0ba-4946-8b1e-211b7113943a
Content-Length: 263
--f5f74a49-a0ba-4946-8b1e-211b7113943a
Content-Disposition: form-data; name="string"; filename="string"
Content-Type: application/octet-stream; charset=utf-8
Content-Length: 36
e25hbWU6ImpvaG4iLHN1cm5hbWU6ImRvZSJ9
--f5f74a49-a0ba-4946-8b1e-211b7113943a--
--> END POST (263-byte body)
But the response is 404:
<-- 404 Not Found https://gateway.ipfs.io/api/v0/add?stream-channels=true&progress=false (343ms)
Date: Fri, 01 Jun 2018 17:16:22 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 18
Connection: keep-alive
Vary: Origin
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
404 page not found
<-- END HTTP (18-byte body)
I'm already fighting with this for hours. I also tried to run own ipfs node on my laptop and add string to it from emulator. Same result.
Thank you.
Hello , I want to know how to download a file like jpg or video file ?
Hello
I am new in Kotlin and gradle. Very interested by your implementation of IPFS in Kotlin I tried to run your tests with gradle and I got the error described here : https://stackoverflow.com/questions/59945979/java-lang-nosuchfieldexception-erreor-from-jacoco.
Could you please tell me what to do to fix this error.
Thank you.
Emile Achadde ([email protected])
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.