It seems to me that there is some code in this module that is either no longer in use or is duplicated somehow, and a lot of the naming is confusing:
lib/file.js - I think this is no longer in use as we now rely on data.js.
lib/util/action-api.js - How is this different from the stuff in index.js (Client.action) and do we need both? Should they be merged/
- The stuff in
lib/util/ckan-auth-api.js is very much related to the other CKAN API wrappers and should probably be merged or at least there is some code that we can DRY out of it and rely on the same logic, no?
- In general why is this stuff under
util? these are not really utilities but core functionality that we are implementing here
- I don't even know what is in
lib/util/general.js but anything that has both util and general in it's name must be misplaced. (Ok I checked what is in there, and I think we should use an npm module for this and not reinvent the wheel)
- Naming - there are methods with very confusing names like
push and pushBlob. This module needs to follow clear semantics, e.g. if this is a CKAN client it should have methods like createResource or updateResource or uploadResourceFile. When push comes to shove, push is just meaningless IMHO.
It seems to me that there is some code in this module that is either no longer in use or is duplicated somehow, and a lot of the naming is confusing:
lib/file.js- I think this is no longer in use as we now rely ondata.js.lib/util/action-api.js- How is this different from the stuff inindex.js(Client.action) and do we need both? Should they be merged/lib/util/ckan-auth-api.jsis very much related to the other CKAN API wrappers and should probably be merged or at least there is some code that we can DRY out of it and rely on the same logic, no?util? these are not really utilities but core functionality that we are implementing herelib/util/general.jsbut anything that has bothutilandgeneralin it's name must be misplaced. (Ok I checked what is in there, and I think we should use an npm module for this and not reinvent the wheel)pushandpushBlob. This module needs to follow clear semantics, e.g. if this is a CKAN client it should have methods likecreateResourceorupdateResourceoruploadResourceFile. When push comes to shove,pushis just meaningless IMHO.