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
Makes a GET request to the IPData API for the specified 'resource' and the given 'fields'.
173
179
174
180
:param resource: Either an IP address or an ASN prefixed by "AS" eg. "AS15169"
175
181
:param fields: A collection of API fields to be returned
182
+
:param select_field: A single field name to return (convenience alternative to fields)
176
183
177
184
:returns: An API response as a DotDict object to allow dot notation access of fields eg. data.ip, data.company.name, data.threat.blocklists[0].name etc
178
185
179
186
:raises IPDataException: if the API call fails or if there is a failure in decoding the response.
180
-
:raises ValueError: if 'resource' is not a string
187
+
:raises ValueError: if 'resource' is not a string, or if both 'select_field' and 'fields' are provided
181
188
"""
182
189
iftype(resource) isnotstr:
183
190
raiseValueError(f"{resource} must be of type 'str'")
0 commit comments