Skip to content

Commit 192bbcb

Browse files
committed
readme: document multi tracker scrape (for #106)
1 parent 22d89f3 commit 192bbcb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,23 @@ server.torrents[infoHash].peers
185185

186186
The http server will handle requests for the following paths: `/announce`, `/scrape`. Requests for other paths will not be handled.
187187

188+
## multi scrape
189+
190+
Scraping multiple torrent info is possible with a static `Client.scrape` method:
191+
192+
```js
193+
var Client = require('bittorrent-tracker')
194+
Client.scrape(announceUrl, [ infoHash1, infoHash2 ], function (err, results) {
195+
results[infoHash1].announce
196+
results[infoHash1].infoHash
197+
results[infoHash1].complete
198+
results[infoHash1].incomplete
199+
results[infoHash1].downloaded
200+
201+
// ...
202+
})
203+
````
204+
188205
## command line
189206

190207
Easily start a tracker server:

0 commit comments

Comments
 (0)