Class: OTX::File

Inherits:
Base
  • Object
show all
Defined in:
lib/otx_ruby/file.rb

Instance Method Summary collapse

Methods inherited from Base

#get, #initialize, #patch, #post

Constructor Details

This class inherits a constructor from OTX::Base

Instance Method Details

#get_analysis(file_hash) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/otx_ruby/file.rb', line 13

def get_analysis(file_hash)
  uri = "/api/v1/indicators/file/#{file_hash}/analysis"

  json_data = get(uri)

  analysis = OTX::Indicator::FileAnalysis.new(json_data)

  return analysis
end

#get_general(file_hash) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/otx_ruby/file.rb', line 3

def get_general(file_hash)
  uri = "/api/v1/indicators/file/#{file_hash}/general"

  json_data = get(uri)

  general = OTX::Indicator::IP::General.new(json_data)

  return general
end