mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-03-14 14:16:15 +01:00
Merge latest api_dev
This commit is contained in:
commit
37b7fede91
1 changed files with 142 additions and 3 deletions
145
doc/api.yaml
145
doc/api.yaml
|
@ -53,6 +53,59 @@ paths:
|
||||||
'404':
|
'404':
|
||||||
description: The user does not exist.
|
description: The user does not exist.
|
||||||
|
|
||||||
|
/users/{user_id}/followers:
|
||||||
|
get:
|
||||||
|
tags: ["followers"]
|
||||||
|
summary: Gets user's followers
|
||||||
|
description: Get the followers list of the user
|
||||||
|
operationId: getUserFollowers
|
||||||
|
security:
|
||||||
|
- BearerAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: user_id
|
||||||
|
in: path
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/uid"
|
||||||
|
required: true
|
||||||
|
description: The user ID of the user to follow.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Returns the user list
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/uid_name"
|
||||||
|
'404':
|
||||||
|
description: The user does not exist.
|
||||||
|
/users/{user_id}/following:
|
||||||
|
get:
|
||||||
|
tags: ["followers"]
|
||||||
|
summary: Gets following users
|
||||||
|
description: Get the users that a user is following
|
||||||
|
operationId: getUserFollowing
|
||||||
|
security:
|
||||||
|
- BearerAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: user_id
|
||||||
|
in: path
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/uid"
|
||||||
|
required: true
|
||||||
|
description: The user ID of the user to follow.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Returns the user list
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/uid_name"
|
||||||
|
'404':
|
||||||
|
description: The user does not exist.
|
||||||
|
|
||||||
/users/{user_id}/followers/{follower_uid}:
|
/users/{user_id}/followers/{follower_uid}:
|
||||||
put:
|
put:
|
||||||
tags: ["followers"]
|
tags: ["followers"]
|
||||||
|
@ -164,6 +217,40 @@ paths:
|
||||||
'404':
|
'404':
|
||||||
description: The user is not banned by the user.
|
description: The user is not banned by the user.
|
||||||
|
|
||||||
|
/users/{user_id}/photos/{photo_id}/likes:
|
||||||
|
get:
|
||||||
|
tags: ["likes"]
|
||||||
|
summary: Gets photo likes
|
||||||
|
description: Get the list of users liking a photo
|
||||||
|
operationId: getPhotoLikes
|
||||||
|
security:
|
||||||
|
- BearerAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: user_id
|
||||||
|
in: path
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/uid"
|
||||||
|
required: true
|
||||||
|
description: The ID of the author of the photo.
|
||||||
|
- name: photo_id
|
||||||
|
in: path
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/photo_id"
|
||||||
|
required: true
|
||||||
|
description: The ID of the photo.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Returns the user list
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
description: An array of users liking the photo.
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/uid_name"
|
||||||
|
'404':
|
||||||
|
description: The user or the photo does not exist.
|
||||||
|
|
||||||
/users/{user_id}/photos/{photo_id}/likes/{liker_uid}:
|
/users/{user_id}/photos/{photo_id}/likes/{liker_uid}:
|
||||||
put:
|
put:
|
||||||
tags: ["likes"]
|
tags: ["likes"]
|
||||||
|
@ -349,6 +436,47 @@ paths:
|
||||||
description: User or photo not found.
|
description: User or photo not found.
|
||||||
|
|
||||||
/users/{user_id}/photos/{photo_id}/comments:
|
/users/{user_id}/photos/{photo_id}/comments:
|
||||||
|
get:
|
||||||
|
tags: ["comments"]
|
||||||
|
summary: Gets photo comments
|
||||||
|
description: Gets the list of comments of a photo
|
||||||
|
operationId: getPhotoComments
|
||||||
|
security:
|
||||||
|
- BearerAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: user_id
|
||||||
|
in: path
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/uid"
|
||||||
|
required: true
|
||||||
|
description: The ID of the author of the photo.
|
||||||
|
- name: photo_id
|
||||||
|
in: path
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/photo_id"
|
||||||
|
required: true
|
||||||
|
description: The ID of the photo.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Returns the comments list
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
description: An array of comments.
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
user_id:
|
||||||
|
$ref: "#/components/schemas/uid"
|
||||||
|
name:
|
||||||
|
$ref: "#/components/schemas/name"
|
||||||
|
comment:
|
||||||
|
$ref: "#/components/schemas/comment"
|
||||||
|
date:
|
||||||
|
$ref: "#/components/schemas/upload_time"
|
||||||
|
'404':
|
||||||
|
description: The user or the photo does not exist.
|
||||||
post:
|
post:
|
||||||
tags: ["comments"]
|
tags: ["comments"]
|
||||||
summary: Comments a photo
|
summary: Comments a photo
|
||||||
|
@ -375,8 +503,7 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
comment:
|
comment:
|
||||||
type: string
|
$ref: "#/components/schemas/comment"
|
||||||
example: "What a lovely picture! 😊"
|
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Comment photo action successful.
|
description: Comment photo action successful.
|
||||||
|
@ -482,11 +609,19 @@ components:
|
||||||
upload_time:
|
upload_time:
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
description: Photo upload time and date.
|
description: Upload time and date.
|
||||||
likes:
|
likes:
|
||||||
type: integer
|
type: integer
|
||||||
example: 90
|
example: 90
|
||||||
description: Number of likes.
|
description: Number of likes.
|
||||||
|
followers_n:
|
||||||
|
type: integer
|
||||||
|
example: 420
|
||||||
|
description: Number of followers.
|
||||||
|
following_n:
|
||||||
|
type: integer
|
||||||
|
example: 69
|
||||||
|
description: Number of following users.
|
||||||
user_photo_stream:
|
user_photo_stream:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -513,6 +648,10 @@ components:
|
||||||
$ref: "#/components/schemas/upload_time"
|
$ref: "#/components/schemas/upload_time"
|
||||||
likes:
|
likes:
|
||||||
$ref: "#/components/schemas/likes"
|
$ref: "#/components/schemas/likes"
|
||||||
|
comment:
|
||||||
|
type: string
|
||||||
|
example: "What a lovely picture! 😊"
|
||||||
|
description: The comment's text
|
||||||
|
|
||||||
requestBodies:
|
requestBodies:
|
||||||
userDetails:
|
userDetails:
|
||||||
|
|
Loading…
Reference in a new issue