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.
-
#feeds ⇒ Object
readonly
Returns the value of attribute feeds.
-
#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.
11 12 13 14 15 16 17 18 19 |
# File 'lib/securitytrails/api.rb', line 11 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) @feeds = Clients::Feeds.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 |
#feeds ⇒ Object (readonly)
Returns the value of attribute feeds.
9 10 11 |
# File 'lib/securitytrails/api.rb', line 9 def feeds @feeds 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 |