Class: SecurityTrails::API
- Inherits:
-
Object
- Object
- SecurityTrails::API
- Defined in:
- lib/securitytrails/api.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#domains ⇒ Object
readonly
Returns the value of attribute domains.
-
#history ⇒ Object
readonly
Returns the value of attribute history.
-
#ips ⇒ Object
readonly
Returns the value of attribute ips.
Instance Method Summary collapse
-
#initialize(api_key = ENV["SECURITYTRAILS_API_KEY"]) ⇒ API
constructor
A new instance of API.
Constructor Details
#initialize(api_key = ENV["SECURITYTRAILS_API_KEY"]) ⇒ API
Returns a new instance of API.
10 11 12 13 14 15 16 17 |
# File 'lib/securitytrails/api.rb', line 10 def initialize(api_key = ENV["SECURITYTRAILS_API_KEY"]) raise(ArgumentError, "'api_key' argument is required") unless api_key @domain = Clients::Domain.new(api_key) @domains = Clients::Domains.new(api_key) @history = Clients::History.new(api_key) @ips = Clients::IPs.new(api_key) end |
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
5 6 7 |
# File 'lib/securitytrails/api.rb', line 5 def domain @domain end |
#domains ⇒ Object (readonly)
Returns the value of attribute domains.
6 7 8 |
# File 'lib/securitytrails/api.rb', line 6 def domains @domains end |
#history ⇒ Object (readonly)
Returns the value of attribute history.
7 8 9 |
# File 'lib/securitytrails/api.rb', line 7 def history @history end |
#ips ⇒ Object (readonly)
Returns the value of attribute ips.
8 9 10 |
# File 'lib/securitytrails/api.rb', line 8 def ips @ips end |