Sha256: 566df04d3742bbda99be2411737c2dcdabdbc07d5aea955025c0b78f66301de9
Contents?: true
Size: 649 Bytes
Versions: 2
Compression:
Stored size: 649 Bytes
Contents
require "mechanize" require "nnmClub_api/version" require "nnmClub_api/tracker" require "nnmClub_api/search" require "nnmClub_api/torrent" class Mechanize def login self.post( NnmClub::LOGIN_PAGE, username: NnmClub::USERNAME, password: NnmClub::PASSWORD, login: "" ) end end module NnmClub class NnmClub_api attr_reader :agent def initialize @agent = Mechanize.new @agent.get(NnmClub::LOGIN_PAGE) @agent.login true end def search query NnmClub::Search.new(query, @agent).torrents end def find id NnmClub::Torrent.find(id, @agent) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nnmClub_api-0.1.4 | lib/nnmClub_api.rb |
nnmClub_api-0.1.3 | lib/nnmClub_api.rb |