]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
add My History API to openapi (#3363)
authorArman <Arman1371@gmail.com>
Wed, 25 Nov 2020 23:27:59 +0000 (02:57 +0330)
committerGitHub <noreply@github.com>
Wed, 25 Nov 2020 23:27:59 +0000 (00:27 +0100)
Co-authored-by: Rigel Kent <sendmemail@rigelk.eu>
Co-authored-by: Rigel Kent <par@rigelk.eu>
support/doc/api/openapi.yaml

index 4feca5d993002ca79537eae6a1b6f16d02e7e8a7..6dd51ec7cdab70f132bfde2749fffdf7362d290b 100644 (file)
@@ -70,6 +70,9 @@ tags:
     description: >
       Operations related to your subscriptions to video channels, their
       new videos, and how to keep up to date with their latest publications!
+  - name: My History
+    description: >
+      Operations related to your watch history. 
   - name: My Notifications
     description: >
       Notifications following new videos, follows or reports. They allow you
@@ -150,6 +153,7 @@ x-tagGroups:
       - My User
       - My Subscriptions
       - My Notifications
+      - My History
   - name: Videos
     tags:
       - Video
@@ -917,6 +921,43 @@ paths:
       responses:
         '204':
           description: successful operation
+  /users/me/history/videos:
+    get:
+      summary: List watched videos history
+      security:
+        - OAuth2: []
+      tags:
+        - My History
+      parameters:
+        - $ref: '#/components/parameters/start'
+        - $ref: '#/components/parameters/count'
+      responses:
+        '200':
+          description: successful operation
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/VideoListResponse'
+  /users/me/history/videos/remove:
+    post:
+      summary: Clear video history
+      security:
+        - OAuth2: []
+      tags:
+        - My History
+      requestBody:
+        content:
+          multipart/form-data:
+            schema:
+              type: object
+              properties:
+                beforeDate:
+                  description: history before this date will be deleted
+                  type: string
+                  format: date-time
+      responses:
+        '204':
+          description: successful operation
   /users/me/avatar/pick:
     post:
       summary: Update my user avatar