aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/api
diff options
context:
space:
mode:
authorYohan Boniface <yohanboniface@free.fr>2019-04-09 11:02:02 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-04-09 11:02:02 +0200
commitc100a6142e6571312db9f6407698a21a08b593fb (patch)
treec80ac9c7754b8f5b133255e003557937e415ee23 /support/doc/api
parent8ce1ba6e3efe0a688d6a0b57e8201cde33ad7aac (diff)
downloadPeerTube-c100a6142e6571312db9f6407698a21a08b593fb.tar.gz
PeerTube-c100a6142e6571312db9f6407698a21a08b593fb.tar.zst
PeerTube-c100a6142e6571312db9f6407698a21a08b593fb.zip
Add /accounts/:username/ratings endpoint (#1756)
* Add /users/me/videos/ratings endpoint * Move ratings endpoint from users to accounts * /accounts/:name/ratings: add support for rating= and sort= * Restrict ratings list to owner * Wording and better way to ensure current account
Diffstat (limited to 'support/doc/api')
-rw-r--r--support/doc/api/openapi.yaml39
1 files changed, 39 insertions, 0 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 46c66a101..833a98d3b 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -1344,6 +1344,35 @@ paths:
1344 type: array 1344 type: array
1345 items: 1345 items:
1346 $ref: '#/components/schemas/VideoChannel' 1346 $ref: '#/components/schemas/VideoChannel'
1347 '/accounts/{name}/ratings':
1348 get:
1349 summary: Get ratings of an account by its name
1350 security:
1351 - OAuth2: []
1352 tags:
1353 - User
1354 parameters:
1355 - $ref: '#/components/parameters/start'
1356 - $ref: '#/components/parameters/count'
1357 - $ref: '#/components/parameters/sort'
1358 - name: rating
1359 in: query
1360 required: false
1361 description: Optionaly filter which ratings to retrieve
1362 schema:
1363 type: string
1364 enum:
1365 - like
1366 - dislike
1367 responses:
1368 '200':
1369 description: successful operation
1370 content:
1371 application/json:
1372 schema:
1373 type: array
1374 items:
1375 $ref: '#/components/schemas/VideoRating'
1347 '/videos/{id}/comment-threads': 1376 '/videos/{id}/comment-threads':
1348 get: 1377 get:
1349 summary: Get the comment threads of a video by its id 1378 summary: Get the comment threads of a video by its id
@@ -2142,6 +2171,16 @@ components:
2142 required: 2171 required:
2143 - id 2172 - id
2144 - rating 2173 - rating
2174 VideoRating:
2175 properties:
2176 video:
2177 $ref: '#/components/schemas/Video'
2178 rating:
2179 type: number
2180 description: 'Rating of the video'
2181 required:
2182 - video
2183 - rating
2145 RegisterUser: 2184 RegisterUser:
2146 properties: 2185 properties:
2147 username: 2186 username: