Skip to content

1v/torckapi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Torckapi — torrent tracker querying API

Gem Version Dependency Status Build Status Code Climate Test Coverage

Description

Torckapi is a querying interface to torrent trackers.

Synopsis

tracker = Torckapi.tracker("udp://generic.url:80/announce")
# => #<Torckapi::Tracker::UDP:0x007fb5941f6ef8
#      @url=#<URI::Generic:0x007fb5941f7038 URL:udp://generic.url:80/announce>,
#      @options={:timeout=>15, :tries=>3}>

Queries

tracker.announce("0123456789ABCDEF0123456789ABCDEF01234567")
# => #<Torckapi::Response::Announce:0x007fa1bc0f11c0
#      @info_hash="0123456789ABCDEF0123456789ABCDEF01234567",
#      @leechers=1,
#      @seeders=1,
#      @peers=[["127.0.0.1", 54078], ["127.0.0.2", 43666]]>

tracker.scrape(["0123456789ABCDEF0123456789ABCDEF01234567",
                "123456789ABCDEF0123456789ABCDEF012345678"])
# => #<Torckapi::Response::Scrape:0x007fa1bc0fe320
#      @data={"0123456789ABCDEF0123456789ABCDEF01234567"=>{:seeders=>3,
#                                                          :completed=>0,
#                                                          :leechers=>13},
#             "123456789ABCDEF0123456789ABCDEF012345678"=>{:seeders=>4,
#                                                          :completed=>10,
#                                                          :leechers=>8}}>

TODO

  • Add tests.
  • Document everything.

About

Torrent tracker querying API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%