C-Accel-CRIPT / sdk-archive

CRIPT Python SDK
MIT License
11 stars 0 forks source link

small edits to JSON when getting File objects #84

Closed CVilla17 closed 1 year ago

CVilla17 commented 1 year ago

Small changes that edit the JSON of file objects that are returned from the api. These changes are in response to changes happening in the development stage, and they shouldn't interfere with current production stage.

nh916 commented 1 year ago

I approve, just a suggestion: If the data returned by the API can cause issues in the SDK (when a new field is returned), maybe it can be a good idea to create node by explicitly setting the fields one by one. Example in the WebSDK: https://github.com/C-Accel-CRIPT/cript-web-sdk/blob/master/src/cript/implems/nodes/primary/file.ts#L22 (the function is loadState(), it takes a raw data (the data received from the API) and set the appropriate fields).

@bearmit I agree that is a nice way of going about it, and usually what I do as well! We are thinking about creating a new Python Client/SDK soon, so we are just patching this one for now, until we can roll out the new one