From 9a70245c2d8b6030ad3a7e1cf6fbf14c3042c42e Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 23 May 2023 16:32:02 +0200 Subject: [PATCH] feat: add /users/@me/members/{memberRef} route (closes #62) --- backend/openapi.html | 4 ++-- backend/routes/member/get_member.go | 26 ++++++++++++++++++++++++++ backend/routes/member/routes.go | 1 + openapi.yaml | 2 +- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/backend/openapi.html b/backend/openapi.html index ded5c4d..90ce8d0 100644 --- a/backend/openapi.html +++ b/backend/openapi.html @@ -462,14 +462,14 @@ IDs are always prioritized, if a user's username is the same as another user

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "display_name": "string",
  • "bio": "string",
  • "avatar": "string",
  • "links": [
    ],
  • "names": [
    ],
  • "pronouns": [
    ],
  • "fields": [
    ],
  • "user": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "display_name": "string",
  • "bio": "string",
  • "avatar": "string",
  • "links": [
    ],
  • "names": [
    ],
  • "pronouns": [
    ],
  • "fields": [
    ],
  • "user": {
    }
}

Get a member by ID or name

path Parameters
userRef
required
string

A user ID or username.

+

Request samples

Content type
application/json
{
  • "name": "string",
  • "display_name": "string",
  • "bio": "string",
  • "avatar": "string",
  • "links": [
    ],
  • "names": [
    ],
  • "pronouns": [
    ],
  • "fields": [
    ],
  • "user": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "display_name": "string",
  • "bio": "string",
  • "avatar": "string",
  • "links": [
    ],
  • "names": [
    ],
  • "pronouns": [
    ],
  • "fields": [
    ],
  • "user": {
    }
}

Get a member by ID or name

path Parameters
userRef
required
string

A user ID, username, or @me for yourself.

memberRef
required
string

A member ID or name.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "display_name": "string",
  • "bio": "string",
  • "avatar": "string",
  • "links": [
    ],
  • "names": [
    ],
  • "pronouns": [
    ],
  • "fields": [
    ],
  • "user": {
    }
}

Get meta info

Responses

Response samples

Content type
application/json
{
  • "git_commit": "130a199",
  • "users": {
    },
  • "members": 11462,
  • "require_invite": false
}