From 12b3387df163f849954605c2faed144b52468559 Mon Sep 17 00:00:00 2001 From: Sascha Rommelfangen Date: Tue, 20 Nov 2018 15:09:29 +0100 Subject: [PATCH 1/2] fixed documentation bug --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 69b594c..bcd70f0 100644 --- a/README.md +++ b/README.md @@ -44,13 +44,22 @@ vim keys.py The API key of MISP is available in the Automation section of the MISP web interface. To test if your URL and API keys are correct, you can test with examples/last.py to -fetch the last 10 events published. +fetch the events published in the last 10 hours. ``` cd examples -python3 last.py -l 10 +python3 last.py -l 10h ``` +Other examples: +``` +python3 last.py -l 1w # 1 week +python3 last.py -l 5d # 5 days +python3 last.py -l 45m # 45 minutes + +``` + + ## Debugging You have two options there: From 4138a848eee8f9561c0c1a716c3289cc3b744d10 Mon Sep 17 00:00:00 2001 From: Sascha Rommelfangen Date: Tue, 20 Nov 2018 15:18:21 +0100 Subject: [PATCH 2/2] be more precise with the supported time indicators --- README.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index bcd70f0..15974a1 100644 --- a/README.md +++ b/README.md @@ -44,19 +44,13 @@ vim keys.py The API key of MISP is available in the Automation section of the MISP web interface. To test if your URL and API keys are correct, you can test with examples/last.py to -fetch the events published in the last 10 hours. - +fetch the events published in the last x amount of time (supported time indicators: days (d), hours (h) and minutes (m)). +last.py ``` cd examples -python3 last.py -l 10h -``` - -Other examples: -``` -python3 last.py -l 1w # 1 week -python3 last.py -l 5d # 5 days +python3 last.py -l 10h # 10 hours +python3 last.py -l 5d # 5 days python3 last.py -l 45m # 45 minutes - ```