]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Improve videos sort documentation
authorChocobozzz <me@florianbigard.com>
Fri, 15 Apr 2022 12:50:09 +0000 (14:50 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 15 Apr 2022 12:50:09 +0000 (14:50 +0200)
support/doc/api/openapi.yaml

index 407f3eb10f0e6f1c780548083a36aa797761469c..60b2fe168f62004ab5574dd67b69d55254258b91 100644 (file)
@@ -4781,23 +4781,31 @@ components:
       name: sort
       in: query
       required: false
-      description: Sort videos by criteria
       schema:
         type: string
         enum:
-        - name
-        - -duration
-        - -createdAt
-        - -publishedAt
-        - -views
-        - -likes
-        - -trending
-        - -hot
+          - name
+          - -duration
+          - -createdAt
+          - -publishedAt
+          - -views
+          - -likes
+          - -trending
+          - -hot
+          - -best
+        description: >
+          Sort videos by criteria (prefixing with `-` means `DESC` order):
+            * `hot` - Adaptation of Reddit "hot" algorithm taking into account video views, likes, dislikes and comments and publication date
+            * `best` - Same than `hot`, but also takes into account user video history
+            * `trending` - Sort videos by recent views ("recent" is defined by the admin)
+            * `views` - Sort videos using their `views` counter
+            * `publishedAt` - Sort by video publication date (when it became publicly available)
     videosSearchSort:
       name: sort
       in: query
       required: false
-      description: Sort videos by criteria
+      description: >
+        Sort videos by criteria (prefixing with `-` means `DESC` order):
       schema:
         type: string
         enum: