From 0959d211197511e9590b3abf63ee9424b5b77a52 Mon Sep 17 00:00:00 2001 From: Ayden Date: Tue, 12 Sep 2023 22:04:18 -0700 Subject: [PATCH 1/4] Redo API docs This should be the main doc complete, will do the other docs soon --- docs/paths/README.md | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/docs/paths/README.md b/docs/paths/README.md index 366d2eb..b68305a 100644 --- a/docs/paths/README.md +++ b/docs/paths/README.md @@ -2,6 +2,7 @@ - Base URL: /api - [Auth](auth/README.md) + > :memo: /auth/[login, register, change-password, forgot-password] are all depricated - Base URL: /api/auth - Login: /login - Register: /register @@ -11,26 +12,24 @@ - GithubLogin: /github-login - Logout: /logout - [Explore](explore/README.md) - > :memo: /explore/[new, popular, trending] are not implemented + > :memo: /explore/* appear to be moved/depricated - Base URL: /api/explore - New: /new - Popular: /popular - Trending: /trending - [Search](explore/search/README.md): - > :memo: /explore/search/roadmaps uses /explore?query="query" + > :memo: Search functions were moved to /api/search - Base URL: /api/explore/search - Users: /users + > :memo: /users endpoint no longer exists... /roadmaps moved to /search/roadmaps - Roadmaps: /roadmaps - [Roadmaps](roadmaps/README.md) + > :memo: /roadmaps/[progress, rating, issues] appear to be moved/depricated - Base URL: /api/roadmaps - Create: /create - [Get](roadmaps/get/README.md): - Base URL: /api/roadmaps/:roadmapId([0-9]+)? - Roadmap: / - - MiniRoadmap: /mini - - Owner: /owner - forwards to /users/:ownerId - - MiniOwner: /owner/mini - forwards to /users/:ownerId/mini - - Tags: /tags - [Update](roadmaps/update/README.md): - Base URL: /api/roadmaps/:roadmapId([0-9]+) - Title: /title @@ -64,6 +63,7 @@ - [Users](users/README.md) - Base URL: /api/users - [Get](users/get/README.md): + > :memo: /users/[issues, followers, following, follower-count, following-count] are depricated - Base URL: /api/users/:userId([0-9]+)? - Profile: / - Mini profile: /mini @@ -85,3 +85,24 @@ - Github url: /github-url - Email: /email - Delete: /:userId([0-9]+)? + +- [Search](search/README.md) + - Base URL: /api/search + - Roadmaps: /roadmaps + - Optional query params: + - q: search query (STRING) + - topic: search by topic + - all: all topics + - programming + - math + - physics + - biology + - sortBy: sort by + - likes + - views + - new + - order: order + - asc + - desc + - limit: limit (INTEGER) + - page: page (INTEGER) From 747f914d6ecdddbeebc304657cba271fd5d3f77b Mon Sep 17 00:00:00 2001 From: Ayden Date: Tue, 12 Sep 2023 23:30:18 -0700 Subject: [PATCH 2/4] Fixing stupid mistakes --- docs/paths/README.md | 49 +++++--------------------------------------- 1 file changed, 5 insertions(+), 44 deletions(-) diff --git a/docs/paths/README.md b/docs/paths/README.md index b68305a..4807c26 100644 --- a/docs/paths/README.md +++ b/docs/paths/README.md @@ -2,29 +2,17 @@ - Base URL: /api - [Auth](auth/README.md) - > :memo: /auth/[login, register, change-password, forgot-password] are all depricated + > :warning: /auth/[login, register, change-password, forgot-password] are all depricated - Base URL: /api/auth - - Login: /login - - Register: /register - - ChangePassword: /change-password - - ForgotPassword: /forgot-password - GoogleLogin: /google-login - GithubLogin: /github-login - Logout: /logout - [Explore](explore/README.md) - > :memo: /explore/* appear to be moved/depricated - - Base URL: /api/explore - - New: /new - - Popular: /popular - - Trending: /trending + > :warning: /explore/* appear to be depricated - [Search](explore/search/README.md): > :memo: Search functions were moved to /api/search - - Base URL: /api/explore/search - - Users: /users - > :memo: /users endpoint no longer exists... /roadmaps moved to /search/roadmaps - - Roadmaps: /roadmaps - [Roadmaps](roadmaps/README.md) - > :memo: /roadmaps/[progress, rating, issues] appear to be moved/depricated + > :warning: /roadmaps/[progress, rating, issues] appear to be depricated - Base URL: /api/roadmaps - Create: /create - [Get](roadmaps/get/README.md): @@ -39,42 +27,15 @@ - Owner: /owner - Data: /data - Delete: /:roadmapId([0-9]+) - - [Progress](roadmaps/progress/README.md): - - Base URL: /api/roadmaps/:roadmapId/progress - - Get: /:userId? - - Update: / - - [Rating](roadmaps/rating/README.md): - - Base URL: /api/roadmaps/:roadmapId/rating - - Get: /:own? # own = true if you want to get your own rating - - Update: / - - Delete: / - - [Issues](roadmaps/issues/README.md): - - Base URL: /api/roadmaps/:roadmapId/issues - - Create: /create - - Get: /:issueId? - - Update: /:issueId - - Close: /:issueId - - [Comments](roadmaps/issues/comments/README.md): - - Base URL: /api/roadmaps/:roadmapId/issues/:issueId/comments - - Create: /create - - Get: /:commentId? - - Update: /:commentId - - Delete: /:commentId - [Users](users/README.md) - Base URL: /api/users - [Get](users/get/README.md): - > :memo: /users/[issues, followers, following, follower-count, following-count] are depricated + > :warning: /users/[issues, followers, following, follower-count, following-count] appear depricated + - Base URL: /api/users/:userId([0-9]+)? - Profile: / - Mini profile: /mini - User roadmaps: /roadmaps - - User issues: /issues - - User followers: /followers - - User followed: /following - - Roadmap count: /roadmap-count - - Issue count: /discussion-count - - Followers count: /follower-count - - Following count: /following-count - [Update](users/update/README.md): - Base URL: /api/users/:userId([0-9]+)? - ProfilePicture: /profile-picture From ff53649c0d8342f8d0fddec34fff9706aaadb38b Mon Sep 17 00:00:00 2001 From: sopy Date: Wed, 13 Sep 2023 17:16:01 +0300 Subject: [PATCH 3/4] Remove 'MiniProfile' from Paths.ts Due to redundancies in the file, the MiniProfile path has been removed from the 'Get' object in Paths.ts. This change was made to simplify the code structure and avoid any confusion, making it easier for developers to understand and work with the codebase. --- src/constants/Paths.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/constants/Paths.ts b/src/constants/Paths.ts index 5767219..60f0695 100644 --- a/src/constants/Paths.ts +++ b/src/constants/Paths.ts @@ -53,7 +53,6 @@ const Paths = { Get: { Base: '/:userId([0-9]+)?', Profile: '/', - MiniProfile: '/mini', UserRoadmaps: '/roadmaps', Follow: '/follow', }, From b209191b790561b41e66778f8f03fbe36cc4155f Mon Sep 17 00:00:00 2001 From: sopy Date: Wed, 13 Sep 2023 17:17:52 +0300 Subject: [PATCH 4/4] Revert "Remove 'MiniProfile' from Paths.ts" oops.. This reverts commit ff53649c0d8342f8d0fddec34fff9706aaadb38b. --- src/constants/Paths.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/constants/Paths.ts b/src/constants/Paths.ts index 60f0695..5767219 100644 --- a/src/constants/Paths.ts +++ b/src/constants/Paths.ts @@ -53,6 +53,7 @@ const Paths = { Get: { Base: '/:userId([0-9]+)?', Profile: '/', + MiniProfile: '/mini', UserRoadmaps: '/roadmaps', Follow: '/follow', },