Method: PassiveTotal::API#classification
- Defined in:
- lib/passivetotal/api.rb
#classification(query, set = nil) ⇒ Object
PassiveTotal uses the notion of classifications to highlight table rows a certain color based on how they have been rated. PassiveTotal::API#classification() queries if only one argument is given, and sets if both are given query: A domain or IP address to query
176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/passivetotal/api.rb', line 176 def classification(query, set=nil) is_valid_with_error(__method__, [:ipv4, :domain], query) if domain?(query) query = normalize_domain(query) end if set.nil? get('actions/classification', {'query' => query}) else is_valid_with_error(__method__.to_s, [:classification], set) post('actions/classification', { 'query' => query, 'classification' => set }) end end |