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
-
.search(query, options = {}) ⇒ Object
Search Fenopy for torrents.
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, = {}) = {} if .nil? [:format] = 'json' [:keyword] = query begin JSON.parse(Nestful.get(BASE_URL, :params => )).collect { |torrent| Torrent.new(torrent) } rescue [] end end |