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



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

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



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

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



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

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



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

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