Released [UNOFFICIAL] ipfs-cluster-api

ipfs-cluster
#1

A JS client library for the IPFS Cluster HTTP API.

Check it out here: ipfs-cluster-api

@hector @kishansagathiya @zenground0 @lanzafame

I would love your feedback :wink:

1 Like
#2

@hector
I have implemented all the commands that I saw in the Go implementation.
I am facing an issue in the add command. Can you check it out?

You can start by running the add.spec.js. Even a hint for “how to solve it?” will be great :slight_smile:

#3

hi, what’s the error? Add requires a multipart request and returns, by default, a streaming response. It is very similar to what js-ipfs-api does to add to IPFS (just different response objects and different query arguments).

#4

@hector

#5

I don’t navigate javascript good enough to say what’s happening. Seems you’re writing after the stream is closed, which might suggest it sent back an error of some kind. Maybe the cluster peer logs something.

#6

@hector

Np. Thanks for the help :wink:

I will try to fix it. BTW do you know anyone who can look into it?
Can @alanshaw look into it?

P.S.: I am sorry if I am bugging you guys a lot :sweat_smile:

#7

@hector

It’s fixed!
Will be releasing v0.0.3 with all the functions.

#8

@hector

Seems like the Go REST APIs for the add method doesn’t return the CIDs :thinking:

The line here returns nil as response for the add request.

Is there any way I can get the CID on adding the data to the cluster?

Again, I am sorry if I am bugging you a lot :sweat_smile:

#9

Not sure if this is related but there’s an issue in 0.4.19 that means it doesn’t return all CIDs when adding multiple files.

See https://github.com/ipfs/go-ipfs/pull/6255

#10

Thanks for informing.
Will keep an eye on that

#11

Released v0.0.3

  • Matches ALL CLI signatures
  • Added an extensive README
#12

That line returns a bad request error. The error should contain more info about why.

#13

Yes, I checked the response from the add API using Postman and it was giving the CID indeed.

I tried a lot, but I am not able to figure out what am I missing(it adds & pins the data to the cluster, but the final response is missing the CIDs.). I have added an issue for the same.

I would love some help here :slight_smile: It seems to be the final glitch remaining in the ipfs-cluster-api.

#14

After 3 straight hours of debugging…FINALLY found the culprit.:triumph:

Anyways, will fix the issue, and update the docs accordingly.
Will also do some cleanups.

Will release v0.0.4 soon.

#15

Released v0.0.5

Now get ipfs_cluster IN BROWSER via:

  • browserify
  • webpack
  • CDN links
1 Like