Closed mrcnski closed 4 years ago
Definitely low priority this one. Also not necessarily breaking if we have a convention that appends _raw
or w/e to the current interface, e.g. upload_file_raw
.. Actually I think python already has _request
, right? Perhaps we can just use that.
In any case I would not add this just yet. One of the things bothering me with the SDKs is the difference in output, where one returns a url on upload, the other a skylink. We should start with fixing just that.. of 3 return a skylink and 1 a url, then let's start with having that one sdk also return a skyink on that call.
These would indeed be breaking changes though...
Luckily the breaking changes will be minimal. curl
and skynet-js
return the full response objects but the rest already return full URIs (URI prefix + skylink):
curl: full object
CLI: uri
Go: uri
skynet-js: full object
nodejs-skynet: uri
python: uri
[ ] I want to expose request
functions like in Python that allow getting the full response data.
[ ] For skynet-js
, the existing functions should be changed to return the full uri -- this will be a breaking change, and should be done sooner rather than later.
[ ] There should also be a note or section in the docs mentioning how to get an identical response to what is returned by curl
.
Will do this in all SDKs soon since we're already breaking compat with the client model refactor.
All SDKs should have methods that wrap the siad API endpoints, and thus return similar responses as if you were to execute a curl command.
I would then wrap those in more human readable / friendly functions. This would allow SDK users to access our API in a 1-1 fashion.
This will be a breaking change.