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
address issue with WorkflowStatus in historical revisions.
version 0.5.2 posted for fix above.
added example code for history summaries.
updated documentation for get_revision_by_number call.
Signed-off-by: Neal Ensor <ensorn@osti.gov>
Various components of record history are available in each revision summary, such as the `date_valid_start` and `date_valid_end`, `workflow_status`, etc. The dates indicate the time frame during which that revision was "current"; if `date_valid_end` is null, this indicates that particular revision is the current one.
233
234
235
+
#### View Record at Revision<aid="view-record-at-revision"></a>
236
+
```python
237
+
from elinkapi import Elink, NotFoundException, ForbiddenException
238
+
239
+
api = Elink(token="__Your_API_Token__")
240
+
241
+
try:
242
+
record = api.get_revision_by_number(4525922,2)
243
+
244
+
record.json()
245
+
246
+
print ("Revision valid from {} to {}".format(record.date_valid_start,
247
+
record.date_valid_end if record.date_valid_end else"Present"))
248
+
except NotFoundException:
249
+
print ("Revision not on file.")
250
+
except ForbiddenException:
251
+
print ("Permission to view record denied.")
252
+
```
253
+
234
254
#### Adding Media to Record<aid="adding-media-to-record"></a>
0 commit comments