Conversation
Signed-off-by: zu1k <i@zu1k.com>
Signed-off-by: zu1k <i@zu1k.com>
Signed-off-by: zu1k <i@zu1k.com>
Signed-off-by: zu1k <i@zu1k.com>
Signed-off-by: zu1k <i@zu1k.com>
Signed-off-by: zu1k <i@zu1k.com>
Signed-off-by: zu1k <i@zu1k.com>
Signed-off-by: zu1k <i@zu1k.com>
|
@zu1k Do you want me to review this? |
|
@ferristseng Sorry for the delay. This PR is currently available, but not complete. I found that some api's actual implementation is slightly different from the description in the documentation, especially when dealing with multiple cids at the same time. You can review this PR now and I'll add more details on the problem I'm having so far at a later time. |
|
The problem mainly lies in the processing of multiple cids. The document says to use comma to separate, but after testing, it is found that the document is inconsistent with the implementation. comma-separated as described in the documentation, but doesn't work # curl -X POST "http://192.168.226.4:5001/api/v0/pin/remote/ls?service=Pinata&cid=bafybeiaq3hspbuvhvg7nlxjjvsnzit6m6hevrjwedoj4jbx6uycgkkexni%2CQmfWC6JwVxmjVQfPpSiTsxFaSBdPTtFCd1B4aqMqRgaeMU"
{"Message":"CID \"bafybeiaq3hspbuvhvg7nlxjjvsnzit6m6hevrjwedoj4jbx6uycgkkexni,QmfWC6JwVxmjVQfPpSiTsxFaSBdPTtFCd1B4aqMqRgaeMU\" cannot be parsed: illegal base32 data at input byte 58","Code":0,"Type":"error"}multi params It works, but it seems that Rust http client do not support this. Please let me know if there is a suitable way to implement this. # curl -X POST "http://192.168.226.4:5001/api/v0/pin/remote/ls?service=Pinata&cid=bafybeiaq3hspbuvhvg7nlxjjvsnzit6m6hevrjwedoj4jbx6uycgkkexni&cid=QmfWC6JwVxmjVQfPpSiTsxFaSBdPTtFCd1B4aqMqRgaeMU"
{"Status":"pinned","Cid":"QmfWC6JwVxmjVQfPpSiTsxFaSBdPTtFCd1B4aqMqRgaeMU","Name":""}
{"Status":"pinned","Cid":"bafybeiaq3hspbuvhvg7nlxjjvsnzit6m6hevrjwedoj4jbx6uycgkkexni","Name":""} |
No rush! It just looked pretty complete so I wanted to check and see what was up. |
Signed-off-by: zu1k <i@zu1k.com>
I still haven't found a proper way to generate request parameters like Maybe we can pull a request to kubo (go-ipfs) to support comma separation. |
|
There is not http standard supports query like As in this PR, I prefer to merge as-is. We can start another issue to track the multiple cids support. |
Add 3 remote pin api:
/pin/remote/add/pin/remote/ls/pin/remote/rm