Skip to content

added deleteDataset($datasetId) to destroy datasets#31

Merged
tainguyenbui merged 1 commit intoIQSS:masterfrom
joenio:dataset-delete
Nov 5, 2020
Merged

added deleteDataset($datasetId) to destroy datasets#31
tainguyenbui merged 1 commit intoIQSS:masterfrom
joenio:dataset-delete

Conversation

@joenio
Copy link
Copy Markdown
Contributor

@joenio joenio commented Nov 2, 2020

Description

This new method make a request to the following address:

  • DELETE /api/datasets/:persistentId/destroy/?persistentId=$datasetId

This Dataverse API endpoint let superusers to remove published datasets and
ordinary users to remove draft/unpublished datasets as can see on the API spec
docs:

Changes

Added new method: deleteDataset($datasetId).

Tests

  1. Create a new dataset, keep it unpublished/draft
  2. Call the new method deleteDataset($datasetId) passing the persistendId of the dataset on $datasetId param
  3. The dataset should be destroyed

Checklist

  • The project builds
  • The project passes lint checks
  • The project passes format checks
  • The project passes unit tests
  • I've manually tested the functionality

Screenshots

Captura de tela de 2020-11-02 15-38-19

Captura de tela de 2020-11-02 15-38-33

This new method make a request to the following address:

* DELETE /api/datasets/:persistentId/destroy/?persistentId=$datasetId

This Dataverse API endpoint let superusers to remove published datasets and
ordinary users to remove draft/unpublished datasets as can see on the API spec
docs:

* https://guides.dataverse.org/en/latest/api/native-api.html#delete-published-dataset
Copy link
Copy Markdown
Contributor

@tainguyenbui tainguyenbui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tainguyenbui
Copy link
Copy Markdown
Contributor

@joenio Once this is merged, we would need to deploy a new version of the library, so please give me a thumbs up if you need it asap and I will take in charge of doing so

@joenio
Copy link
Copy Markdown
Contributor Author

joenio commented Nov 2, 2020

@tainguyenbui thanks for your quickly feedback here, I'm going to start work on the issue #30 also, maybe it's a good idea to wait it to release a new package including this also, but I don't know how much time it takes me as I'm not much experienced with Dataverse API yet.

@tainguyenbui
Copy link
Copy Markdown
Contributor

@tainguyenbui thanks for your quickly feedback here, I'm going to start work on the issue #30 also, maybe it's a good idea to wait it to release a new package including this also, but I don't know how much time it takes me as I'm not much experienced with Dataverse API yet.

No worries! you can continue adding changes to this PR. I would encourage adding something in the PR title such as [WIP] or [DO NOT MERGE]. Thanks for contributing 😊

@joenio
Copy link
Copy Markdown
Contributor Author

joenio commented Nov 2, 2020

@tainguyenbui thanks for your quickly feedback here, I'm going to start work on the issue #30 also, maybe it's a good idea to wait it to release a new package including this also, but I don't know how much time it takes me as I'm not much experienced with Dataverse API yet.

No worries! you can continue adding changes to this PR. I would encourage adding something in the PR title such as [WIP] or [DO NOT MERGE]. Thanks for contributing blush

Thanks, but I will open new contributions in new PR, this PR here is finished. BTW, I like to know about this practice of putting info on the PR title.

@tainguyenbui tainguyenbui merged commit 8b224a4 into IQSS:master Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants