Skip to content

Clean up this module #34

Description

@shevron

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:

  1. lib/file.js - I think this is no longer in use as we now rely on data.js.
  2. 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/
  3. 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?
  4. In general why is this stuff under util? these are not really utilities but core functionality that we are implementing here
  5. 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)
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions