Commit 161a15b9 authored by MaxGranzow's avatar MaxGranzow Committed by Julien Schröter

Add API specification for user recommendation endpoint

parent 4330a1b5
...@@ -83,6 +83,57 @@ paths: ...@@ -83,6 +83,57 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/error' $ref: '#/components/schemas/error'
'/user/recommended':
get:
summary: Get user recommendations.
description: >-
Returns an array of objects representing verified users that
are not friends of the accessing user and not the user.
Optionally the maximum number of results can be specified.
The default number of recommendations is three.
At most ten users are returned at once.
The user objects are stripped down to what is necessary
to know as an app user.
parameters:
- name: c
description: The number of recommendations to return. Default is three.
in: query
required: false
schema:
type: number
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/userinfo'
'400':
description: Result count is no number.
content:
application/json:
schema:
$ref: '#/components/schemas/input-error'
'401':
description: Authentication failure.
content:
text/plain:
schema:
type: string
'500':
description: The server cannot deliver due to an internal error.
content:
application/json:
schema:
$ref: '#/components/schemas/internal-error'
default:
description: Some unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'/user/search': '/user/search':
get: get:
summary: Search for users by their username. summary: Search for users by their username.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment