From 8339f1142982964fc67a6efe61061d01e2e574c4 Mon Sep 17 00:00:00 2001 From: Jared Fagel Date: Fri, 18 Feb 2022 15:30:23 -0600 Subject: [PATCH] Added additional export data. Export should include the created date (for retention purposes), the description, the action configuration, and the enabled status. --- examples/response/watchlist_exporter.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/response/watchlist_exporter.py b/examples/response/watchlist_exporter.py index ae521789..728ed015 100755 --- a/examples/response/watchlist_exporter.py +++ b/examples/response/watchlist_exporter.py @@ -50,13 +50,18 @@ def export_watchlists(cb, args): if not confirm(watchlist.name): continue + watchlist_actions = cb.get_object('/api/v1/watchlist/{0}/action_type'.format(watchlist.id)) + exported_watchlists.append( { + "Created": str(watchlist.date_added), "Name": watchlist.name, "URL": watchlist.search_query, "Type": watchlist.index_type, "SearchString": watchlist.query, - "Description": "Please fill in if you intend to share this." + "Description": watchlist.description, + "Actions": watchlist_actions, + "Enabled": watchlist.enabled } )