-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Alert object * Added url to alert * Added tests for the new alert object * Remove AlertDfinitionMapping as TypedDict is not supported on older versions of python * Made Alert object more similar to BaseAnalysis * Add changes * Added a function to fetch the scans for a given alert, and create corresponding objects for them * Assuming that alert id exists in send_alert * Add wait for Alert.from_id, Fix PR comments * Removed interval from object, renamed self.raw_alert to self._report * Version bump
- Loading branch information
1 parent
0718959
commit d99e9f0
Showing
9 changed files
with
387 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import sys | ||
from pprint import pprint | ||
|
||
from intezer_sdk import api | ||
from intezer_sdk.alerts import Alert | ||
|
||
|
||
def get_alert_by_id(alert_id: str): | ||
api.set_global_api('<api_key>') | ||
|
||
alert = Alert.from_id(alert_id=alert_id, | ||
fetch_scans=False, | ||
wait=False) | ||
pprint(alert) | ||
|
||
|
||
if __name__ == '__main__': | ||
get_alert_by_id(*sys.argv[1:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '1.17.4' | ||
__version__ = '1.18' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.