aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorMatt Lyon <matthewlyon18@gmail.com>2020-08-23 20:48:34 +1000
committerMatt Lyon <matthewlyon18@gmail.com>2020-08-23 20:48:34 +1000
commitcab856e292d96f8ae3686b0d25a778d1682691ae (patch)
treea411e028c916cb4fcc38d628b67d98fa4d5efa31 /README.md
parentfb301e7a1bdb4e010bc7fb1e2da353a4808fce7a (diff)
downloadtpb-lite-0.4.0.tar.gz
tpb-lite-0.4.0.tar.bz2
tpb-lite-0.4.0.zip
added top to READMEv0.4.00.4.0
Diffstat (limited to 'README.md')
-rw-r--r--README.md14
1 files changed, 13 insertions, 1 deletions
diff --git a/README.md b/README.md
index 083310f..bb4ad7c 100644
--- a/README.md
+++ b/README.md
@@ -57,6 +57,18 @@ torrents = t.browse(category=CATEGORIES.VIDEOS)
torrents = t.browse(category=CATEGORIES.VIDEO.MOVIES, page=1, order=ORDERS.UPLOADED.DES)
```
+## Top
+```python
+from tpblite import TPB, CATEGORIES
+t = TPB()
+
+# Get the top recent torrents
+torrents = t.top(CATEGORIES.GAMES.ALL)
+
+# Customize with category and restriction to torrents from the last 48h
+torrents = t.top(category=CATEGORIES.GAMES.ALL, last_48=True)
+```
+
## Categories and Sort Order
```python
# To print all available categories, use the classmethod printOptions
@@ -76,6 +88,7 @@ You can see how many `Torrent` objects your query has returned, by using the `le
## Torrent object
`Torrent` objects represent each torrent found in the `Torrents` class, they have the following attributes
+
### Attributes
- `Torrent.title` - The name of the torrent (str)
- `Torrent.seeds` - The number of seeders (int)
@@ -86,7 +99,6 @@ You can see how many `Torrent` objects your query has returned, by using the `le
- `Torrent.byte_size` - The filesize in bytes of the torrent (int)
- `Torrent.magnetlink` - magnetlink of the torrent (str)
-
Example Workflow
==========