|
| 1 | + |
| 2 | +# VVnT API Documentation |
| 3 | + |
| 4 | +Welcome to the VVnT API documentation, showcasing the innovative backend code developed by Saurabh Maurya for VVnT Organization. Powered by SpringBoot, this code reflects precision and excellence, offering a seamless and robust experience. Dive into the realm of VVnT and witness Saurabh Maurya's vision, where every line of code signifies dedication, brilliance, and a commitment to unparalleled performance. |
| 5 | + |
| 6 | +## Contact Information |
| 7 | +- **Developer:** Saurabh Maurya |
| 8 | +- **Website:** [VVnT](https://vvnt.netlify.app/) |
| 9 | + |
| 10 | +- **License:** [OPEN License](https://quikbazaar.netlify.app/) |
| 11 | + |
| 12 | +## API Documentation External Docs |
| 13 | +For additional information, please refer to our [external documentation](https://github.com/saurabhm1). |
| 14 | + |
| 15 | +## API Base URL |
| 16 | +[http://vvnt.up.railway.app](http://vvnt.up.railway.app) - Generated server URL. |
| 17 | + |
| 18 | +## Table of Contents |
| 19 | +1. [UserController](#usercontroller) |
| 20 | + - [Get Single User by UserId](#get-single-user-by-userid) |
| 21 | + - [Update User](#update-user) |
| 22 | + - [Delete User](#delete-user) |
| 23 | + - [Get All Users](#get-all-users) |
| 24 | + - [Create New User](#create-new-user) |
| 25 | + - [Serve User Image](#serve-user-image) |
| 26 | + - [Upload User Image](#upload-user-image) |
| 27 | + - [Search Users](#search-users) |
| 28 | + - [Get User by Email](#get-user-by-email) |
| 29 | + - [Get Current User](#get-current-user) |
| 30 | +2. [AuthController](#authcontroller) |
| 31 | + - [Login](#login) |
| 32 | + - [Login with Google](#login-with-google) |
| 33 | + - ... (The rest of the AuthController operations follow a similar pattern) |
| 34 | + |
| 35 | +--- |
| 36 | + |
| 37 | +## UserController |
| 38 | + |
| 39 | +### Get Single User by UserId |
| 40 | +- **Endpoint:** `/users/{userId}` |
| 41 | +- **Method:** `GET` |
| 42 | +- **Parameters:** |
| 43 | + - `{userId}`: User ID (String) |
| 44 | +- **Response:** |
| 45 | + ```json |
| 46 | + { |
| 47 | + // UserDto details |
| 48 | + } |
| 49 | + ``` |
| 50 | + |
| 51 | +### Update User |
| 52 | +- **Endpoint:** `/users/{userId}` |
| 53 | +- **Method:** `PUT` |
| 54 | +- **Parameters:** |
| 55 | + - `{userId}`: User ID (String) |
| 56 | +- **Request Body:** |
| 57 | + ```json |
| 58 | + { |
| 59 | + // UserDto details |
| 60 | + } |
| 61 | + ``` |
| 62 | +- **Response:** |
| 63 | + ```json |
| 64 | + { |
| 65 | + // Updated UserDto details |
| 66 | + } |
| 67 | + ``` |
| 68 | + |
| 69 | +### Delete User |
| 70 | +- **Endpoint:** `/users/{userId}` |
| 71 | +- **Method:** `DELETE` |
| 72 | +- **Parameters:** |
| 73 | + - `{userId}`: User ID (String) |
| 74 | +- **Response:** |
| 75 | + ```json |
| 76 | + { |
| 77 | + "message": "User deleted successfully", |
| 78 | + "success": true, |
| 79 | + "status": "200 OK" |
| 80 | + } |
| 81 | + ``` |
| 82 | + |
| 83 | +### Get All Users |
| 84 | +- **Endpoint:** `/users` |
| 85 | +- **Method:** `GET` |
| 86 | +- **Parameters:** |
| 87 | + - `pageNumber` (Optional): Page number (Integer, default: 0) |
| 88 | + - `pageSize` (Optional): Page size (Integer, default: 10) |
| 89 | + - `sortBy` (Optional): Sort field (String, default: "name") |
| 90 | + - `sortDir` (Optional): Sort direction (String, default: "asc") |
| 91 | +- **Response:** |
| 92 | + ```json |
| 93 | + { |
| 94 | + // PageableResponseUserDto details |
| 95 | + } |
| 96 | + ``` |
| 97 | + |
| 98 | +### Create New User |
| 99 | +- **Endpoint:** `/users` |
| 100 | +- **Method:** `POST` |
| 101 | +- **Request Body:** |
| 102 | + ```json |
| 103 | + { |
| 104 | + // UserDto details |
| 105 | + } |
| 106 | + ``` |
| 107 | +- **Response:** |
| 108 | + ```json |
| 109 | + { |
| 110 | + // New UserDto details |
| 111 | + } |
| 112 | + ``` |
| 113 | + |
| 114 | +### Serve User Image |
| 115 | +- **Endpoint:** `/users/image/{userId}` |
| 116 | +- **Method:** `GET` |
| 117 | +- **Parameters:** |
| 118 | + - `{userId}`: User ID (String) |
| 119 | +- **Response:** |
| 120 | + ```json |
| 121 | + { |
| 122 | + // User image details |
| 123 | + } |
| 124 | + ``` |
| 125 | + |
| 126 | +### Upload User Image |
| 127 | +- **Endpoint:** `/users/image/{userId}` |
| 128 | +- **Method:** `POST` |
| 129 | +- **Parameters:** |
| 130 | + - `{userId}`: User ID (String) |
| 131 | +- **Request Body:** |
| 132 | + ```json |
| 133 | + { |
| 134 | + "userImage": "base64EncodedImage" |
| 135 | + } |
| 136 | + ``` |
| 137 | +- **Response:** |
| 138 | + ```json |
| 139 | + { |
| 140 | + // ImageResponse details |
| 141 | + } |
| 142 | + ``` |
| 143 | + |
| 144 | +### Search Users |
| 145 | +- **Endpoint:** `/users/search/{keywords}` |
| 146 | +- **Method:** `GET` |
| 147 | +- **Parameters:** |
| 148 | + - `{keywords}`: Search keywords (String) |
| 149 | + - `pageNumber` (Optional): Page number (Integer, default: 0) |
| 150 | + - `pageSize` (Optional): Page size (Integer, default: 10) |
| 151 | + - `sortBy` (Optional): Sort field (String, default: "name") |
| 152 | + - `sortDir` (Optional): Sort direction (String, default: "asc") |
| 153 | +- **Response:** |
| 154 | + ```json |
| 155 | + { |
| 156 | + // PageableResponseUserDto details |
| 157 | + } |
| 158 | + ``` |
| 159 | + |
| 160 | +### Get User by Email |
| 161 | +- **Endpoint:** `/users/email/{email}` |
| 162 | +- **Method:** `GET` |
| 163 | +- **Parameters:** |
| 164 | + - `{email}`: User email (String) |
| 165 | +- **Response:** |
| 166 | + ```json |
| 167 | + { |
| 168 | + // UserDto details |
| 169 | + } |
| 170 | + ``` |
| 171 | + |
| 172 | +### Get Current User |
| 173 | +- **Endpoint:** `/auth/current` |
| 174 | +- **Method:** `GET` |
| 175 | +- **Response:** |
| 176 | + ```json |
| 177 | + { |
| 178 | + // UserDto details |
| 179 | + } |
| 180 | + ``` |
| 181 | + |
| 182 | +--- |
| 183 | + |
| 184 | +## AuthController |
| 185 | + |
| 186 | +### Login |
| 187 | +- **Endpoint:** `/auth/login` |
| 188 | +- **Method:** `POST` |
| 189 | +- **Request Body:** |
| 190 | + ```json |
| 191 | + { |
| 192 | + |
| 193 | + "password": "password123" |
| 194 | + } |
| 195 | + ``` |
| 196 | +- **Response:** |
| 197 | + ```json |
| 198 | + { |
| 199 | + "jwtToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", |
| 200 | + "user": { |
| 201 | + // UserDto details |
| 202 | + } |
| 203 | + } |
| 204 | + ``` |
| 205 | +- **Security:** Bearer Token (`JWT`) |
| 206 | + |
| 207 | +### Login with Google |
| 208 | +- **Endpoint:** `/auth/google` |
| 209 | +- **Method:** `POST` |
| 210 | +- **Request Body:** |
| 211 | + ```json |
| 212 | + { |
| 213 | + // Google Sign-In response |
| 214 | + } |
| 215 | + ``` |
| 216 | +- **Response:** |
| 217 | + ```json |
| 218 | + { |
| 219 | + "jwtToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", |
| 220 | + "user": { |
| 221 | + // UserDto details |
| 222 | + } |
| 223 | + } |
| 224 | + ``` |
| 225 | +- **Security:** Bearer Token (`JWT`) |
| 226 | + |
| 227 | +... (The rest of the AuthController operations follow a similar pattern) |
| 228 | + |
| 229 | +--- |
| 230 | + |
| 231 | +This documentation provides a comprehensive guide to the VVnT API. Explore and integrate to experience the seamless blend of innovation and expertise. |
| 232 | +``` |
| 233 | +
|
| 234 | +This version includes the specified addition. Feel free to use and modify it as needed |
| 235 | +
|
| 236 | +. |
0 commit comments