Class: SaucenaoAPI::Saucenao
- Inherits:
-
Object
- Object
- SaucenaoAPI::Saucenao
- Defined in:
- lib/saucenao.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
-
#initialize(api_key) ⇒ Saucenao
constructor
A new instance of Saucenao.
- #search(url) ⇒ Object
Constructor Details
#initialize(api_key) ⇒ Saucenao
11 12 13 |
# File 'lib/saucenao.rb', line 11 def initialize(api_key) @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object (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 |