From 192bbcbf5898e5a38c22741efbd7bc0c17a415c9 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 10 Feb 2016 18:47:05 -0800 Subject: [PATCH] readme: document multi tracker scrape (for #106) --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 40b5b76..93e6d7f 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,23 @@ server.torrents[infoHash].peers The http server will handle requests for the following paths: `/announce`, `/scrape`. Requests for other paths will not be handled. +## multi scrape + +Scraping multiple torrent info is possible with a static `Client.scrape` method: + +```js +var Client = require('bittorrent-tracker') +Client.scrape(announceUrl, [ infoHash1, infoHash2 ], function (err, results) { + results[infoHash1].announce + results[infoHash1].infoHash + results[infoHash1].complete + results[infoHash1].incomplete + results[infoHash1].downloaded + + // ... +}) +```` + ## command line Easily start a tracker server: