Bases: object
Returns the combined APP-ID and APP-SECRET stored during init().
| Returns: | str |
|---|
Use HTTP POST and add a connection between two objects.
| Parameters: | object_id (str) – The other object-id in the connection. |
|---|---|
| Returns: | dict (using json.loads()) |
Use HTTP DELETE and remove the connection to another object.
| Parameters: | object_id (str) – The other object-id in the connection. |
|---|---|
| Returns: | dict (using json.loads()) |
Get object details. Allows you to limit the fields returned in the object’s details. Also allows you to provide a connection. If a connection is provided, the related objects will be returned instead of the object itself.
NOTE: This method can be used on both instantiated and uninstantiated classes like so:
foo = ThreatIndicator(id=‘1234’) foo.details()
foo = ThreatIndicator.details(id=‘1234’)
BE AWARE: Due to the nature of ThreatExchange allowing you to query for an object by ID but not actually telling you the type of object returned to you, using an ID for an object of a different type (ex: ID for a Malware object using ThreatIndicator class) will result in the wrong object populated with only data that is common between the two objects.
| Parameters: |
|
|---|---|
| Returns: | Generator, dict, class |
Expire by setting the ‘expired_on’ timestamp.
| Parameters: | timestamp (str) – The timestamp to set for an expiration date. |
|---|
Mark an object as a false positive by setting the status to UNKNOWN.
| Parameters: | object_id (str) – The object-id of the object to mark. |
|---|
Wrapper around __getattr__ making it easier to use the vocabulary to get class attributes.
| Parameters: | attr (str) – The name of the attribute to get. |
|---|
Get objects from ThreatExchange.
| Parameters: |
|
|---|---|
| Returns: | Generator, dict (using json.loads()) |
Given a dictionary, populate self with the keys as attributes.
| Parameters: | attrs (dict) – A dictionary used as attributes and values. |
|---|
Save this object. If it is a new object, use self._fields to build the POST and submit to the appropriate URL. If it is an update to an existing object, use self._changed to only submit the modified attributes in the POST.
| Returns: | dict (using json.loads()) |
|---|