From 5766ca36994bc72f5478e97a2acfb0e9976d5616 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 24 May 2021 16:07:45 -0400 Subject: [PATCH] Add user info endpoint --- API-Docs.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/API-Docs.md b/API-Docs.md index 1f5027b..af4666a 100644 --- a/API-Docs.md +++ b/API-Docs.md @@ -191,6 +191,41 @@ __________________________________________________________________ __________________________________________________________________ +##### **GET** `/api/userInfo` + +**Input**: +```js +{ + userID: string //the local user id +} +``` +**OR** +```js +{ + publicUserID: string +} +``` + +**Response**: +```js +{ + userID: string, // the public user ID + userName: string, + minutesSaved: float, + segmentCount: int, + viewCount: int, + warnings: int, + reputation: float, + vip: boolean, +} +``` + +**Error codes**: + +400: Bad inputs + +__________________________________________________________________ + ##### **GET** `/api/getViewsForUser` **Input**: