You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Feature: Added dvObject and type fields to Featured Items
2
+
3
+
Dataverse Featured Items can now be linked to Dataverses, Datasets, or Datafiles.
4
+
5
+
Pre-existing featured items as well as new items without dvObjects will be defaulted to type=custom.
6
+
7
+
Featured Items with dvObjects will be filtered out of lists if the dvObject should not be viewed (i.e. datafiles that are restricted or datasets that are deaccessioned)
Copy file name to clipboardExpand all lines: doc/sphinx-guides/source/api/native-api.rst
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1218,9 +1218,13 @@ The ``file`` parameter must be specified for each image we want to attach to fea
1218
1218
1219
1219
The ``id`` parameter must be ``0`` for new items or set to the item's identifier for updates. The ``fileName`` parameter should be empty to exclude an image or match the name of a file sent in a ``file`` parameter to set a new image. ``keepFile`` must always be set to ``false``, unless it's an update to a featured item where we want to preserve the existing image, if one exists.
1220
1220
1221
+
The ``type`` and ``dvObject`` parameters are optional. These allow you to link the featured item to a Dataverse, Dataset, or Datafile.
1222
+
The ``dvObject`` can be passed as the id or the persistent identifier and the ``type`` must be passed as either "dataverse", "dataset", or "datafile", depending on the type of object.
1223
+
If no ``dvObject`` is passed the ``type`` will default to "custom" designating no linked object.
1224
+
1221
1225
Note that any existing featured item not included in the call with its associated identifier and corresponding properties will be removed from the collection.
1222
1226
1223
-
The following example creates two featured items, with an image assigned to the second one:
1227
+
The following example creates two featured items, with an image and a dataset assigned to the second one:
1224
1228
1225
1229
.. code-block:: bash
1226
1230
@@ -1234,6 +1238,8 @@ The following example creates two featured items, with an image assigned to the
The following example creates one featured item and updates a second one, keeping the existing image it may have had:
1273
+
The following example creates one featured item and updates a second one, keeping the existing image it may have had but removes the dataset link and defaults the type to "custom":
0 commit comments