Module: Fenopy

Defined in:
lib/fenopy.rb,
lib/fenopy/torrent.rb,
lib/fenopy/version.rb

Defined Under Namespace

Classes: Torrent

Constant Summary collapse

BASE_URL =
"http://fenopy.eu/module/search/api.php"
VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.search(query, options = {}) ⇒ Object

Search Fenopy for torrents. For options, see their API - fenopy.eu/info/api.html



10
11
12
13
14
15
16
17
18
19
# File 'lib/fenopy.rb', line 10

def self.search(query, options = {}) 
		options = {} if options.nil?
		options[:format] = 'json'
		options[:keyword] = query
		begin
			JSON.parse(Nestful.get(BASE_URL, :params => options)).collect { |torrent| Torrent.new(torrent) }
	rescue
		[]
	end
end