Browse Source

Various small updates

pjc 4 years ago
parent
commit
8c208685f8
4 changed files with 161 additions and 144 deletions
  1. 3
    1
      docs/index.md
  2. 0
    141
      docs/requests.md
  3. 145
    1
      docs/torrents.md
  4. 13
    1
      docs/users.md

+ 3
- 1
docs/index.md View File

@@ -59,8 +59,10 @@ Please get it touch if you'd like me to list your project below.
59 59
 
60 60
 ## Rate limit
61 61
 
62
-The API is rate-limited to one request every ten seconds.
62
+The API is rate-limited to one request every 12 seconds.
63 63
 This limit doesn't apply to users in the Donor class.
64
+[Please consider donating](https://www.patreon.com/biotorrents)
65
+to support this scientific resource's development.
64 66
 
65 67
 
66 68
 ## Under construction

+ 0
- 141
docs/requests.md View File

@@ -1,141 +0,0 @@
1
-# Requests
2
-
3
-Endpoints related to torrent requests.
4
-
5
-
6
-## Request
7
-
8
-**Request**
9
-
10
-`ajax.php?action=request`
11
-
12
-`&id=` — request id (required)
13
-
14
-`&page=` — page of the comments to display (default: last page)
15
-
16
-
17
-**Response**
18
-
19
-```json
20
-{
21
-    "status": "success",
22
-    "response": {
23
-        "requestId": 2,
24
-        "requestorId": 2,
25
-        "requestorName": "me",
26
-        "isBookmarked": false,
27
-        "requestTax": 0.1,
28
-        "timeAdded": "2020-04-23 02:02:37",
29
-        "canEdit": true,
30
-        "canVote": true,
31
-        "minimumVote": 20971520,
32
-        "voteCount": 1,
33
-        "lastVote": "2020-11-15 06:51:56",
34
-        "topContributors": [
35
-            {
36
-                "userId": 2,
37
-                "userName": "me",
38
-                "bounty": 15461882266
39
-            }
40
-        ],
41
-        "totalBounty": 15461882266,
42
-        "categoryId": 10,
43
-        "categoryName": "Models",
44
-        "title": "Markov State Model Database of Protein Folding Datasets",
45
-        "year": 0,
46
-        "image": "",
47
-        "bbDescription": "BBcode",
48
-        "description": "HTML",
49
-        "artists": [
50
-            {
51
-                "id": 88,
52
-                "name": "Thomas Lane"
53
-            }
54
-        ],
55
-        "isFilled": false,
56
-        "fillerId": 0,
57
-        "fillerName": "",
58
-        "torrentId": 0,
59
-        "timeFilled": "",
60
-        "tags": [
61
-            "coding",
62
-            "proteomics",
63
-            "biochemistry",
64
-            "data.science",
65
-            "gene.expression"
66
-        ],
67
-        "comments": [],
68
-        "commentPage": 1,
69
-        "commentPages": 0
70
-    }
71
-}
72
-```
73
-
74
-
75
-## Search
76
-
77
-If no arguments are specified then the most recent requests are shown.
78
-
79
-
80
-**Request**
81
-
82
-`ajax.php?action=requests`
83
-
84
-`&page=` — page to display (default: `1`)
85
-
86
-`&search=` — search term
87
-
88
-`&show_filled=` — include filled requests in results `true` or `false` (default: `false`)
89
-
90
-`&tag=` — tags to search by (comma separated)
91
-
92
-`&tags_type=` — `0` for any, `1` for match all
93
-
94
-`filter_cat[]`, `releases[]`, `bitrates[]`, `formats[]`, `media[]` — as used on requests.php
95
-
96
-
97
-**Response**
98
-
99
-```json
100
-{
101
-    "status": "success",
102
-    "response": {
103
-        "currentPage": 1,
104
-        "pages": 1,
105
-        "results": [
106
-            {
107
-                "requestId": 3,
108
-                "requestorId": 2,
109
-                "requestorName": "me",
110
-                "timeAdded": "2020-11-15 06:49:10",
111
-                "lastVote": "2020-11-15 06:49:27",
112
-                "voteCount": 1,
113
-                "bounty": 7825312768,
114
-                "categoryId": 8,
115
-                "categoryName": "Images",
116
-                "authors": [
117
-                    {
118
-                        "id": 148,
119
-                        "name": "Oliver Batchelor"
120
-                    }
121
-                ],
122
-                "title": "trees.tar.gz",
123
-                "year": 0,
124
-                "picture": "",
125
-                "description": "BBcode",
126
-                "isFilled": false,
127
-                "fillerId": 0,
128
-                "fillerName": "",
129
-                "torrentId": 0,
130
-                "timeFilled": ""
131
-            },
132
-            {
133
-                "requestId": 2,
134
-                "requestorId": 2,
135
-                # etc.
136
-            },
137
-            # etc.
138
-        ]
139
-    }
140
-}
141
-```

+ 145
- 1
docs/torrents.md View File

@@ -252,6 +252,7 @@ The advanced search options are certain to change in the future.
252 252
 }
253 253
 ```
254 254
 
255
+
255 256
 ## Comments 
256 257
 
257 258
 Fetch comments from torrent pages.
@@ -290,7 +291,8 @@ Fetch comments from torrent pages.
290 291
                     "avatar": "https://i.imgur.com/OdSSWrw.png",
291 292
                     "enabled": true,
292 293
                     "userTitle": null
293
-                }
294
+                },
295
+                # etc.
294 296
             }
295 297
         ]
296 298
     }
@@ -298,6 +300,10 @@ Fetch comments from torrent pages.
298 300
 ```
299 301
 
300 302
 
303
+# Torrent features
304
+
305
+Various features around the torrents themselves.
306
+
301 307
 ## Collage
302 308
 
303 309
 **Request**
@@ -414,6 +420,144 @@ Please see the response below for details.
414 420
 ```
415 421
 
416 422
 
423
+## Request
424
+
425
+**Request**
426
+
427
+`ajax.php?action=request`
428
+
429
+`&id=` — request id (required)
430
+
431
+`&page=` — page of the comments to display (default: last page)
432
+
433
+
434
+**Response**
435
+
436
+```json
437
+{
438
+    "status": "success",
439
+    "response": {
440
+        "requestId": 2,
441
+        "requestorId": 2,
442
+        "requestorName": "me",
443
+        "isBookmarked": false,
444
+        "requestTax": 0.1,
445
+        "timeAdded": "2020-04-23 02:02:37",
446
+        "canEdit": true,
447
+        "canVote": true,
448
+        "minimumVote": 20971520,
449
+        "voteCount": 1,
450
+        "lastVote": "2020-11-15 06:51:56",
451
+        "topContributors": [
452
+            {
453
+                "userId": 2,
454
+                "userName": "me",
455
+                "bounty": 15461882266
456
+            }
457
+        ],
458
+        "totalBounty": 15461882266,
459
+        "categoryId": 10,
460
+        "categoryName": "Models",
461
+        "title": "Markov State Model Database of Protein Folding Datasets",
462
+        "year": 0,
463
+        "image": "",
464
+        "bbDescription": "BBcode",
465
+        "description": "HTML",
466
+        "artists": [
467
+            {
468
+                "id": 88,
469
+                "name": "Thomas Lane"
470
+            }
471
+        ],
472
+        "isFilled": false,
473
+        "fillerId": 0,
474
+        "fillerName": "",
475
+        "torrentId": 0,
476
+        "timeFilled": "",
477
+        "tags": [
478
+            "coding",
479
+            "proteomics",
480
+            "biochemistry",
481
+            "data.science",
482
+            "gene.expression"
483
+        ],
484
+        "comments": [],
485
+        "commentPage": 1,
486
+        "commentPages": 0
487
+    }
488
+}
489
+```
490
+
491
+
492
+## Request search
493
+
494
+If no arguments are specified then the most recent requests are shown.
495
+
496
+
497
+**Request**
498
+
499
+`ajax.php?action=requests`
500
+
501
+`&page=` — page to display (default: `1`)
502
+
503
+`&search=` — search term
504
+
505
+`&show_filled=` — include filled requests in results `true` or `false` (default: `false`)
506
+
507
+`&tag=` — tags to search by (comma separated)
508
+
509
+`&tags_type=` — `0` for any, `1` for match all
510
+
511
+`filter_cat[]`, `releases[]`, `bitrates[]`, `formats[]`, `media[]` — as used on requests.php
512
+
513
+
514
+**Response**
515
+
516
+```json
517
+{
518
+    "status": "success",
519
+    "response": {
520
+        "currentPage": 1,
521
+        "pages": 1,
522
+        "results": [
523
+            {
524
+                "requestId": 3,
525
+                "requestorId": 2,
526
+                "requestorName": "me",
527
+                "timeAdded": "2020-11-15 06:49:10",
528
+                "lastVote": "2020-11-15 06:49:27",
529
+                "voteCount": 1,
530
+                "bounty": 7825312768,
531
+                "categoryId": 8,
532
+                "categoryName": "Images",
533
+                "authors": [
534
+                    {
535
+                        "id": 148,
536
+                        "name": "Oliver Batchelor"
537
+                    }
538
+                ],
539
+                "title": "trees.tar.gz",
540
+                "year": 0,
541
+                "picture": "",
542
+                "description": "BBcode",
543
+                "isFilled": false,
544
+                "fillerId": 0,
545
+                "fillerName": "",
546
+                "torrentId": 0,
547
+                "timeFilled": ""
548
+            },
549
+            {
550
+                "requestId": 2,
551
+                "requestorId": 2,
552
+                # etc.
553
+            },
554
+            # etc.
555
+        ]
556
+    }
557
+}
558
+```
559
+
560
+
417 561
 ## Top 10
418 562
 
419 563
 Fetch the Top 10 torrents, tags, or users.

+ 13
- 1
docs/users.md View File

@@ -491,8 +491,20 @@ Fetch bookmarked torrents or artists.
491 491
 
492 492
 **Response**
493 493
 
494
-```json
494
+```php
495
+# Currently no proper status response.
496
+# Please see the code snippet below:
497
+
498
+switch ($Type) {
499
+  case NotificationsManager::INBOX:
500
+    NotificationsManager::clear_inbox();
501
+    break;
502
+
503
+  case NotificationsManager::NEWS:
504
+    NotificationsManager::clear_news(false);
505
+    break;
495 506
 
507
+  # etc.
496 508
 ```
497 509
 
498 510
 

Loading…
Cancel
Save