Module: Torznab::Client

Extended by:
Caps
Defined in:
lib/torznab/client.rb,
lib/torznab/client/caps.rb,
lib/torznab/client/http.rb,
lib/torznab/client/version.rb,
lib/torznab/client/caps/category.rb,
lib/torznab/client/caps/instance.rb,
lib/torznab/client/caps/search_mode.rb,
lib/torznab/client/caps/subcategory.rb,
lib/torznab/client/errors/xml_error.rb,
lib/torznab/client/caps/search_modes.rb,
lib/torznab/client/errors/caps_error.rb,
lib/torznab/client/errors/http_error.rb,
lib/torznab/client/caps/mappers/category_mapper.rb,
lib/torznab/client/caps/mappers/instance_mapper.rb,
lib/torznab/client/caps/mappers/categories_mapper.rb,
lib/torznab/client/caps/mappers/search_mode_mapper.rb,
lib/torznab/client/caps/mappers/subcategory_mapper.rb,
lib/torznab/client/caps/mappers/search_modes_mapper.rb,
lib/torznab/client/caps/mappers/category_or_subcategory_mapper.rb

Overview

Ruby client to Torznab APIs.

Defined Under Namespace

Modules: Caps, Errors, Http

Constant Summary collapse

VERSION =

:nodoc:

'0.1.0'.freeze

Constants included from Caps

Caps::HTTP_CAPS_PARAMS

Instance Attribute Summary

Attributes included from Caps

#caps

Class Method Summary collapse

Methods included from Caps

fetch_caps_from_url

Class Method Details

.new(api_url, api_key = nil) ⇒ Torznab::Client

Returns a new Torznab::Client instance after initializing it

Parameters:

  • api_url (String)
  • api_key (String) (defaults to: nil)

Returns:

Raises:


18
19
20
21
# File 'lib/torznab/client.rb', line 18

def new(api_url, api_key = nil)
  fetch_caps_from_url api_url, api_key
  self
end