Class: SaucenaoAPI::Saucenao

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key) ⇒ Saucenao

Returns a new instance of Saucenao


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

def initialize(api_key)
  @api_key = api_key
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key


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

def api_key
  @api_key
end

Instance Method Details

#search(url) ⇒ Object


15
16
17
18
# File 'lib/saucenao.rb', line 15

def search(url)
  response = API.search(url, @api_key, 2, 1, 80, 32)
  READ.first(response)
end