Class: Shodanz::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/shodanz/client.rb

Overview

General client container class for all three of Shodan’s available API endpoints in a convient place to use.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeClient

Create a new client to connect to any of the APIs.



16
17
18
19
20
# File 'lib/shodanz/client.rb', line 16

def initialize
  @rest_api      = Shodanz.api.rest.new
  @streaming_api = Shodanz.api.streaming.new
  @exploits_api  = Shodanz.api.exploits.new
end

Instance Attribute Details

#exploits_apiShodanz::API::Exploits (readonly)



13
14
15
# File 'lib/shodanz/client.rb', line 13

def exploits_api
  @exploits_api
end

#rest_apiShodanz::API::REST (readonly)

Returns:



9
10
11
# File 'lib/shodanz/client.rb', line 9

def rest_api
  @rest_api
end

#streaming_apiShodanz::API::Streaming (readonly)



11
12
13
# File 'lib/shodanz/client.rb', line 11

def streaming_api
  @streaming_api
end