IQSS / dataverse-client-javascript

A Dataverse client for JavaScript and TypeScript
MIT License
15 stars 8 forks source link

115 - Create use case to get a file #119

Closed MellyGray closed 7 months ago

MellyGray commented 7 months ago

What this PR does / why we need it:

This PR adds a new use case getFile to the module to get a file given its id or persistentId and an optional datasetVersion.

Which issue(s) this PR closes:

Related Dataverse PRs:

Special notes for your reviewer:

The API needs to be extended to accept the datasetVersion parameter, so for the moment this use case will throw a Not Implemented Yet error when the user specifies a datasetVersion different than draft or latest.

Suggestions on how to test this:

  1. Visual inspection of the code
  2. Check unit and integration tests execution in GitHub actions

Is there a release notes update needed for this change?

getFile use cases added to the module to get a file given its id or persistentId and an optional datasetVersion

Additional documentation:

MellyGray commented 7 months ago

@ekraffmiller, I think I might need to assign this to myself again after reading this explanation. It seems that files do not have versions. Therefore, fileVersionId should be renamed to dataverseVersionId in the GetFile use case

GPortas commented 7 months ago

@MellyGray Can you please solve merge conflicts?