Class: Pulsedive::CLI::Threat

Inherits:
Base
  • Object
show all
Defined in:
lib/pulsedive/cli.rb

Instance Method Summary collapse

Instance Method Details

#get_by_id(id) ⇒ Object



61
62
63
64
65
66
# File 'lib/pulsedive/cli.rb', line 61

def get_by_id(id)
  with_error_handling do
    json = api.threat.get_by_id(id)
    puts JSON.pretty_generate(json)
  end
end

#get_by_name(name) ⇒ Object



69
70
71
72
73
74
# File 'lib/pulsedive/cli.rb', line 69

def get_by_name(name)
  with_error_handling do
    json = api.threat.get_by_name(name)
    puts JSON.pretty_generate(json)
  end
end

#get_linked_indicators_by_id(id) ⇒ Object



85
86
87
88
89
90
# File 'lib/pulsedive/cli.rb', line 85

def get_linked_indicators_by_id(id)
  with_error_handling do
    json = api.threat.get_linked_indicators_by_id(id)
    puts JSON.pretty_generate(json)
  end
end

#get_summary_by_id(id) ⇒ Object



77
78
79
80
81
82
# File 'lib/pulsedive/cli.rb', line 77

def get_summary_by_id(id)
  with_error_handling do
    json = api.threat.get_summary_by_id(id)
    puts JSON.pretty_generate(json)
  end
end