{"info":{"_postman_id":"93f17e5c-7177-436b-894b-878c09f0a747","name":"React Blogify","description":"<html><head></head><body><p>React Blogify is an API project designed to facilitate learning about integrating APIs with frontend applications, particularly in React. The API provides various endpoints for managing blog posts, user authentication, profile management, and interaction with blog content.</p>\n<p><strong>Key Features:</strong></p>\n<ol>\n<li><strong>User Authentication:</strong> Allows users to register, login, and manage their profiles securely using JWT (JSON Web Tokens) for authentication.</li>\n<li><strong>Blog Post Management:</strong> Enables users to create, read, update, and delete their blog posts. Users can also like, comment on, and mark blog posts as favorites.</li>\n<li><strong>Profile Management:</strong> Provides endpoints for users to update their profile information, including name, bio, and avatar.</li>\n</ol>\n<p><strong>Endpoints:</strong></p>\n<ol>\n<li><strong>Authentication:</strong><ul>\n<li><code>/auth/register</code>: Register a new user.</li>\n<li><code>/auth/login</code>: Log in an existing user and obtain JWT tokens for authentication.</li>\n<li><code>/auth/refresh-token</code>: Refresh the access token using the refresh token.</li>\n</ul>\n</li>\n<li><strong>Blog Posts:</strong><ul>\n<li><code>/blogs</code>: Retrieve all blog posts or create a new blog post.</li>\n<li><code>/blogs/:id</code>: Retrieve, update, or delete a specific blog post by ID.</li>\n<li><code>/blogs/:id/comment</code>: Add a comment to a specific blog post.</li>\n<li><code>/blogs/:id/like</code>: Like a specific blog post.</li>\n<li><code>/blogs/:id/favorite</code>: Mark a specific blog post as a favorite.</li>\n</ul>\n</li>\n<li><strong>Profile Management:</strong><ul>\n<li><code>/profile/:userId</code>: Retrieve the profile information of a specific user.</li>\n<li><code>/profile/avatar</code>: Upload or retrieve the avatar image for the user's profile.</li>\n<li><code>/profile</code>: Update the profile information of the authenticated user.</li>\n</ul>\n</li>\n</ol>\n<p><strong>Authentication and Authorization:</strong></p>\n<ul>\n<li>User authentication is implemented using JWT tokens, ensuring secure access to API endpoints.</li>\n<li>Access to certain endpoints, such as creating, updating, or deleting blog posts, requires authentication with valid JWT tokens.</li>\n</ul>\n<p><strong>Usage:</strong></p>\n<ul>\n<li>Developers can use this API project to learn how to integrate backend APIs with React frontend applications.</li>\n<li>By exploring the provided endpoints, developers can understand how to perform CRUD (Create, Read, Update, Delete) operations on blog posts, manage user authentication, and update user profiles.</li>\n</ul>\n<p>React Blogify API serves as an educational resource for developers aiming to enhance their skills in integrating APIs with React applications. With its comprehensive set of endpoints and user-friendly documentation, developers can effectively learn how to build interactive blog websites with React and backend APIs.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"9649334","collectionId":"93f17e5c-7177-436b-894b-878c09f0a747","publishedId":"2sA2rCU2NA","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-02-23T20:00:03.000Z"},"item":[{"name":"User Authentication","item":[{"name":"login","event":[{"listen":"prerequest","script":{"id":"44deaf17-41d1-46dd-ac77-09822285309b","exec":[""],"type":"text/javascript"}}],"id":"d8a39a5d-887a-4b8e-a00f-96ce96c88461","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\" : \"salahuddin@learnwithsumit.com\",\n    \"password\" : \"learnwithsumit123\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/auth/login","description":"<p>This API endpoint allows users to authenticate and obtain access tokens for accessing protected resources within the system. Upon successful authentication, the endpoint returns a user object along with an access token and a refresh token.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>POST http://localhost:3000/auth/login</code></p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/auth/login' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"email\" : \"saad.hasan2@gmail.com\",\n    \"password\" : \"123as123\"\n}'\n\n</code></pre>\n<h3 id=\"request-body-parameters\">Request Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>Required</td>\n<td>The email address of the user.</td>\n</tr>\n<tr>\n<td>password</td>\n<td>Required</td>\n<td>The password associated with the user's account.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"user\": {\n        \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n        \"email\": \"saad.hasan2@gmail.com\",\n        \"firstName\": \"Saad\",\n        \"lastName\": \"Hasan\",\n        \"avatar\": null,\n        \"favourites\": []\n    },\n    \"token\": {\n        \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEwNzE5ZWZlLTBmNzgtNGY4Ni05Mzc3LTVkODA0ZGVkZWNkZiIsImVtYWlsIjoic2FhZC5oYXNhbjJAZ21haWwuY29tIiwidHlwZSI6ImFjY2VzcyIsImlhdCI6MTcwODUwNTc3NywiZXhwIjoxNzA4NTA5Mzc3fQ.Jbup2LBySUgEoI22ZkvdIY-DOCLPU1l3qgp0AIJpJkQ\",\n        \"refreshToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEwNzE5ZWZlLTBmNzgtNGY4Ni05Mzc3LTVkODA0ZGVkZWNkZiIsImVtYWlsIjoic2FhZC5oYXNhbjJAZ21haWwuY29tIiwidHlwZSI6InJlZnJlc2giLCJpYXQiOjE3MDg1MDU3NzcsImV4cCI6MTcwODU5MjE3N30.8pDDHQc3kT0TW_QWDWd0T-hnSM4brSou6qI3RVYNSl4\"\n    }\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<ul>\n<li><strong>user</strong> (object): Information about the authenticated user.<ul>\n<li><strong>id</strong> (string): The unique identifier of the user.</li>\n<li><strong>email</strong> (string): The email address of the user.</li>\n<li><strong>firstName</strong> (string): The first name of the user.</li>\n<li><strong>lastName</strong> (string): The last name of the user.</li>\n<li><strong>avatar</strong> (string, nullable): URL to the user's avatar image.</li>\n<li><strong>favourites</strong> (array): An array of the user's favorite items.</li>\n</ul>\n</li>\n<li><strong>token</strong> (object): Tokens issued upon successful authentication.<ul>\n<li><strong>accessToken</strong> (string): A JWT access token used for authenticating subsequent requests.</li>\n<li><strong>refreshToken</strong> (string): A JWT refresh token used for obtaining new access tokens.</li>\n</ul>\n</li>\n</ul>\n<hr />\n","urlObject":{"path":["auth","login"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"d8a39a5d-887a-4b8e-a00f-96ce96c88461"},{"name":"Register User","id":"d9b64af7-303e-46b9-9ef7-57c0835ef239","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\" : \"salahuddin@learnwithsumit.com\",\n    \"password\" : \"learnwithsumit123\",\n    \"firstName\" : \"Md\", \n    \"lastName\" : \"salahuddin\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/auth/register","description":"<h4 id=\"endpoint\">Endpoint</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">POST /auth/register\n\n</code></pre>\n<h4 id=\"description\">Description</h4>\n<p>Registers a new user with the provided email, password, first name, and last name.</p>\n<h4 id=\"request\">Request</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/auth/register' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"email\": \"saad.hasan2@gmail.com\",\n    \"password\": \"12300123\",\n    \"firstName\": \"Saad\",\n    \"lastName\": \"Hasan\"\n}'\n\n</code></pre>\n<ul>\n<li><strong>email</strong>: Email address of the user.</li>\n<li><strong>password</strong>: User's chosen password.</li>\n<li><strong>firstName</strong>: First name of the user.</li>\n<li><strong>lastName</strong>: Last name of the user.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>Upon successful registration, the endpoint returns a JSON object containing the newly registered user's details along with authentication tokens.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"user\": {\n        \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n        \"email\": \"saad.hasan2@gmail.com\",\n        \"firstName\": \"Saad\",\n        \"lastName\": \"Hasan\",\n        \"avatar\": null,\n        \"favourites\": []\n    },\n    \"token\": {\n        \"accessToken\": \"&lt;access_token&gt;\",\n        \"refreshToken\": \"&lt;refresh_token&gt;\"\n    }\n}\n\n</code></pre>\n<ul>\n<li><strong>id</strong>: Unique identifier of the newly registered user.</li>\n<li><strong>email</strong>: Email address of the user.</li>\n<li><strong>firstName</strong>: First name of the user.</li>\n<li><strong>lastName</strong>: Last name of the user.</li>\n<li><strong>avatar</strong>: Avatar of the user (if available, otherwise null).</li>\n<li><strong>favourites</strong>: List of favorite items (empty array by default).</li>\n<li><strong>accessToken</strong>: JWT access token for authentication.</li>\n<li><strong>refreshToken</strong>: JWT refresh token for refreshing access tokens.</li>\n</ul>\n<h4 id=\"status-codes\">Status Codes</h4>\n<ul>\n<li><strong>201 Created</strong>: User successfully registered.</li>\n<li><strong>400 Bad Request</strong>: Invalid request body.</li>\n<li><strong>409 Conflict</strong>: User with the provided email already exists.</li>\n</ul>\n","urlObject":{"path":["auth","register"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"d9b64af7-303e-46b9-9ef7-57c0835ef239"},{"name":"Refresh Token","id":"9b2ce1ff-5b72-4019-9a53-76eb4746ad04","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"refreshToken\" : \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjNkMmRkZTRiNjU0ODI3NWZiMDY2IiwiZW1haWwiOiJzYWFkaGFzYW5AbGVhcm53aXRoc3VtaXQuY29tIiwidHlwZSI6InJlZnJlc2giLCJpYXQiOjE3MDg3NzU1MjcsImV4cCI6MTcwODg2MTkyN30.gJ8JQF_dvw4y5GKBgHGZA_z29JzOVjkzWCg70whD-z4\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/auth/refresh-token","description":"<p>This API endpoint allows users to refresh their access tokens using a valid refresh token. The endpoint receives a refresh token as input and returns a new access token and refresh token pair.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>POST http://localhost:3000/auth/refresh-token</code></p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/auth/refresh-token' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"refreshToken\" : \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjIzYzBkMTNjLWRhM2QtNDllZC05N2U1LWI3MzhmZDFjNGEwYyIsImVtYWlsIjoic2FhZC5oYXNhbkBnbWFpbC5jb20iLCJ0eXBlIjoicmVmcmVzaCIsImlhdCI6MTcwODM1NTQ1MCwiZXhwIjoxNzA4NDQxODUwfQ.ENlBE-6fcUw9MYIiltkNrACINmbQTBR1n_3PM_sSejc\"\n}'\n\n</code></pre>\n<h3 id=\"request-body-parameters\">Request Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>refreshToken</td>\n<td>The refresh token obtained during authentication.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEwNzE5ZWZlLTBmNzgtNGY4Ni05Mzc3LTVkODA0ZGVkZWNkZiIsImVtYWlsIjoic2FhZC5oYXNhbjJAZ21haWwuY29tIiwidHlwZSI6ImFjY2VzcyIsImlhdCI6MTcwODUwNjEyMSwiZXhwIjoxNzA4NTA5NzIxfQ.QMtejsIM1kWhD1ExEZv8cAQb_jhakm_2qBCokAM2ETk\",\n    \"refreshToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEwNzE5ZWZlLTBmNzgtNGY4Ni05Mzc3LTVkODA0ZGVkZWNkZiIsImVtYWlsIjoic2FhZC5oYXNhbjJAZ21haWwuY29tIiwidHlwZSI6InJlZnJlc2giLCJpYXQiOjE3MDg1MDYxMjEsImV4cCI6MTcwODU5MjUyMX0.NSdZwBJo_q3s44R3VeGPRiLMNyWSPCA9Llr7dDlkwUg\"\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<ul>\n<li><strong>accessToken</strong> (string): A new JWT access token used for authenticating subsequent requests.</li>\n<li><strong>refreshToken</strong> (string): A new JWT refresh token used for obtaining new access tokens.</li>\n</ul>\n","urlObject":{"path":["auth","refresh-token"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"9b2ce1ff-5b72-4019-9a53-76eb4746ad04"}],"id":"14ef57cb-4e70-4cc9-9ebe-b5f7f7e10ee1","description":"<p>The User Authentication section of the React Blogify API provides endpoints for user registration, login, and token refresh. These endpoints are crucial for securing user access to the API and ensuring that authenticated users can perform authorized actions.</p>\n","_postman_id":"14ef57cb-4e70-4cc9-9ebe-b5f7f7e10ee1"},{"name":"Blogs","item":[{"name":"Comments","item":[{"name":"Comment","id":"00839735-0a52-4dc2-99b4-7210a0071840","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1YWZmMzg5ZjE4MjJhNWU5ZjQzIiwiZW1haWwiOiJzYWxhaHVkZGluQGxlYXJud2l0aHN1bWl0LmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3MDkzMDYwMjksImV4cCI6MTcwOTMwNjA4OX0.I0WW3KBpNz3W1VBtynD-NmfYSi_DKjb0Os0335sbK4E"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"content\" : \"আমি JavaScript এর অনেক  টিউটোরিয়াল দেখেছি অন্যান্য ভাইয়াদের channel থেকে। আমার মনে হয়, কিছু কিছু ভাইদের উদ্দেশ্য হয়তো বিগিনারদের ভীতু করা, ভাগিয়ে দেওয়া যে সহজ বিষয় কঠিন করে বুঝানো। আমি আপনার মধ্যে সেটা একদমই দেখি না। সত্যিকার অর্থে- আপনি একজন বিগিনারবান্ধব।। অসংখ্য ধন্যবাদ ভাইয়া আপনাকে।\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/blogs/7c12b4b48531bcc995ae/comment","description":"<p>This API endpoint allows users to add a comment to a specific blog post. Users must provide the blog ID along with the comment content in the request body. Authentication using a bearer token is required to access this endpoint.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>POST http://localhost:3000/blogs//comment</code></p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location &amp;#x27;http://localhost:3000/blogs/&lt;blog_id&gt;/comment&amp;#x27; \\\n--header 'Content-Type: application/json' \\\n--header &amp;#x27;Authorization: Bearer &lt;access_token&gt;&amp;#x27; \\\n--data '{\n    \"content\": \"&lt;comment_body&gt;\"\n}'\n\n</code></pre>\n<h3 id=\"request-body-parameters\">Request Body Parameters</h3>\n<ul>\n<li><strong>content</strong> (string): The content of the comment to be added to the blog post.</li>\n</ul>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"2d716ab74691a2c5c964\",\n    \"title\": \"New JavaScript Version is Available\",\n    \"content\": \"Hello\",\n    \"thumbnail\": null,\n    \"author\": {\n        \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n        \"firstName\": \"Saad\",\n        \"lastName\": \"Hasan\",\n        \"avatar\": null\n    },\n    \"tags\": [\n        \"a\"\n    ],\n    \"likes\": 0,\n    \"comments\": [\n        {\n            \"id\": \"175c33d429e6242203b6\",\n            \"content\": \"Aenean eleifend ante maecenas pulvinar montes lorem et pede dis dolor pretium donec dictum. Vici consequat justo enim. Venenatis eget adipiscing luctus lorem.\",\n            \"author\": {\n                \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n                \"firstName\": \"Saad\",\n                \"lastName\": \"Hasan\",\n                \"avatar\": \"avatar-1708589704280-90672434.jpeg\"\n            }\n        }\n    ]\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<ul>\n<li><p><strong>id</strong> (string): The unique identifier of the blog post.</p>\n</li>\n<li><p><strong>title</strong> (string): The title of the blog post.</p>\n</li>\n<li><p><strong>content</strong> (string): The content of the blog post.</p>\n</li>\n<li><p><strong>thumbnail</strong> (string): The filename of the thumbnail image associated with the blog post.</p>\n</li>\n<li><p><strong>author</strong> (object): Information about the author of the blog post.</p>\n<ul>\n<li><p><strong>id</strong> (string): The unique identifier of the author.</p>\n</li>\n<li><p><strong>firstName</strong> (string): The first name of the author.</p>\n</li>\n<li><p><strong>lastName</strong> (string): The last name of the author.</p>\n</li>\n<li><p><strong>avatar</strong> (string): The filename of the author's avatar image.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>tags</strong> (array): An array of tags associated with the blog post.</p>\n</li>\n<li><p><strong>likes</strong> (integer): The number of likes on the blog post.</p>\n</li>\n<li><p><strong>comments</strong> (array): An array of comments posted on the blog post. Each comment object contains:</p>\n<ul>\n<li><p><strong>id</strong> (string): The unique identifier of the comment.</p>\n</li>\n<li><p><strong>content</strong> (string): The content of the comment.</p>\n</li>\n<li><p><strong>author</strong> (object): Information about the author of the comment.</p>\n<ul>\n<li><p><strong>id</strong> (string): The unique identifier of the author.</p>\n</li>\n<li><p><strong>firstName</strong> (string): The first name of the author.</p>\n</li>\n<li><p><strong>lastName</strong> (string): The last name of the author.</p>\n</li>\n<li><p><strong>avatar</strong> (string): The filename of the author's avatar image.</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"path":["blogs","7c12b4b48531bcc995ae","comment"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"00839735-0a52-4dc2-99b4-7210a0071840"},{"name":"Comment","id":"8475a1a9-dc6e-4a0b-b599-dd0f29b88dfd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1YWZmMzg5ZjE4MjJhNWU5ZjQzIiwiZW1haWwiOiJzYWxhaHVkZGluQGxlYXJud2l0aHN1bWl0LmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3MDkzMDYwMjksImV4cCI6MTcwOTMwNjA4OX0.I0WW3KBpNz3W1VBtynD-NmfYSi_DKjb0Os0335sbK4E"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/blogs/2d716ab74691a2c5c964/comment/175c33d429e6242203b6","description":"<p>This API endpoint allows users to delete a comment from a specific blog post. Users must provide the blog ID and the comment ID in the URL to specify the blog post and the comment to be deleted. Authentication using a bearer token is required to access this endpoint.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>DELETE http://localhost:3000/blogs//comment/</code></p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location --request DELETE &amp;#x27;http://localhost:3000/blogs/&lt;blog_id&gt;/comment/&lt;comment_id&gt;&amp;#x27; \\\n--header &amp;#x27;Authorization: Bearer &lt;access_token&gt;&amp;#x27;\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<p>Upon successful deletion, the API returns the updated details of the blog post with the comment removed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"2d716ab74691a2c5c964\",\n    \"title\": \"New JavaScript Version is Available\",\n    \"content\": \"Hello\",\n    \"thumbnail\": null,\n    \"author\": {\n        \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n        \"firstName\": \"Saad\",\n        \"lastName\": \"Hasan\",\n        \"avatar\": null\n    },\n    \"tags\": [\n        \"a\"\n    ],\n    \"likes\": 0,\n    \"comments\": []\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<ul>\n<li><p><strong>id</strong> (string): The unique identifier of the blog post.</p>\n</li>\n<li><p><strong>title</strong> (string): The title of the blog post.</p>\n</li>\n<li><p><strong>content</strong> (string): The content of the blog post.</p>\n</li>\n<li><p><strong>thumbnail</strong> (string): The filename of the thumbnail image associated with the blog post.</p>\n</li>\n<li><p><strong>author</strong> (object): Information about the author of the blog post.</p>\n<ul>\n<li><p><strong>id</strong> (string): The unique identifier of the author.</p>\n</li>\n<li><p><strong>firstName</strong> (string): The first name of the author.</p>\n</li>\n<li><p><strong>lastName</strong> (string): The last name of the author.</p>\n</li>\n<li><p><strong>avatar</strong> (string): The filename of the author's avatar image.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>tags</strong> (array): An array of tags associated with the blog post.</p>\n</li>\n<li><p><strong>likes</strong> (integer): The number of likes on the blog post.</p>\n</li>\n<li><p><strong>comments</strong> (array): An empty array indicating that the comment has been successfully deleted.</p>\n</li>\n</ul>\n","urlObject":{"path":["blogs","2d716ab74691a2c5c964","comment","175c33d429e6242203b6"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"8475a1a9-dc6e-4a0b-b599-dd0f29b88dfd"}],"id":"bb35bd32-98c8-434c-8b5d-3cf38ed78fb8","description":"<p>There are only two end points are available for comments. Which is creating a comment and deleting a comment. Currently, Editing comment is not available.</p>\n","_postman_id":"bb35bd32-98c8-434c-8b5d-3cf38ed78fb8"},{"name":"Favourites","item":[{"name":"Favourites","id":"83133da8-1a93-4de5-90e9-74d76f9d4d35","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1YWZmMzg5ZjE4MjJhNWU5ZjQzIiwiZW1haWwiOiJzYWxhaHVkZGluQGxlYXJud2l0aHN1bWl0LmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3MDkzMDYwMjksImV4cCI6MTcwOTMwNjA4OX0.I0WW3KBpNz3W1VBtynD-NmfYSi_DKjb0Os0335sbK4E"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/blogs/favourites","urlObject":{"path":["blogs","favourites"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"83133da8-1a93-4de5-90e9-74d76f9d4d35"},{"name":"Toggle Favourite","id":"b9838af9-f50c-44c3-982e-fa85c174dee8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1YWZmMzg5ZjE4MjJhNWU5ZjQzIiwiZW1haWwiOiJzYWxhaHVkZGluQGxlYXJud2l0aHN1bWl0LmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3MDkzMDYwMjksImV4cCI6MTcwOTMwNjA4OX0.I0WW3KBpNz3W1VBtynD-NmfYSi_DKjb0Os0335sbK4E"}]},"isInherited":false},"method":"PATCH","header":[],"url":"http://localhost:3000/blogs/7c12b4b48531bcc995ae/favourite","urlObject":{"path":["blogs","7c12b4b48531bcc995ae","favourite"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"b9838af9-f50c-44c3-982e-fa85c174dee8"}],"id":"50199063-835a-441a-80a2-9d717cbbdd7d","_postman_id":"50199063-835a-441a-80a2-9d717cbbdd7d","description":""},{"name":"Get Popular","id":"c27ae5db-7141-40c5-8873-2d3783b8eb99","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/blogs/popular","description":"<p>This API endpoint allows users to retrieve a list of popular blog posts. The popularity of a blog post is determined based on certain criteria, such as the number of likes or views. This endpoint returns a paginated list of popular blog posts.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET http://localhost:3000/blogs/popular</code></p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/blogs/popular'\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<p>Upon successful retrieval, the API returns a list of popular blog posts along with the total count.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"total\": 5,\n    \"blogs\": [\n        {\n            \"id\": \"2d716ab74691a2c5c964\",\n            \"title\": \"New JavaScript Version is Available\",\n            \"content\": \"Hello\",\n            \"thumbnail\": null,\n            \"author\": {\n                \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n                \"firstName\": \"Saad\",\n                \"lastName\": \"Hasan\",\n                \"avatar\": null\n            },\n            \"tags\": [\n                \"a\"\n            ],\n            \"likes\": 0,\n            \"comments\": []\n        },\n        ... More 4 blogs\n    ]\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<ul>\n<li><strong>total</strong> (integer): The total number of popular blog posts.</li>\n<li><strong>blogs</strong> (array): An array of popular blog posts. Each blog post object contains the following parameters:<ul>\n<li><strong>id</strong> (string): The unique identifier of the blog post.</li>\n<li><strong>title</strong> (string): The title of the blog post.</li>\n<li><strong>content</strong> (string): The content of the blog post.</li>\n<li><strong>thumbnail</strong> (string): The filename of the thumbnail image associated with the blog post.</li>\n<li><strong>author</strong> (object): Information about the author of the blog post.<ul>\n<li><strong>id</strong> (string): The unique identifier of the author.</li>\n<li><strong>firstName</strong> (string): The first name of the author.</li>\n<li><strong>lastName</strong> (string): The last name of the author.</li>\n<li><strong>avatar</strong> (string): The filename of the author's avatar image.</li>\n</ul>\n</li>\n<li><strong>tags</strong> (array): An array of tags associated with the blog post.</li>\n<li><strong>likes</strong> (integer): The number of likes on the blog post.</li>\n<li><strong>comments</strong> (array): An array of comments posted on the blog post.</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"path":["blogs","popular"],"host":["http://localhost:3000"],"query":[{"disabled":true,"description":{"content":"<p>The limit parameter allows you to specify the maximum number of popular blogs that the API will retrieve. By default, the limit is set to 5.</p>\n","type":"text/plain"},"key":"limit","value":"5"}],"variable":[]}},"response":[],"_postman_id":"c27ae5db-7141-40c5-8873-2d3783b8eb99"},{"name":"Create New Blog","id":"3c21c239-f743-4066-a8a2-cc003cccc032","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1YWZmMzg5ZjE4MjJhNWU5ZjQzIiwiZW1haWwiOiJzYWxhaHVkZGluQGxlYXJud2l0aHN1bWl0LmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3MDkzMDYwMjksImV4cCI6MTcwOTMwNjA4OX0.I0WW3KBpNz3W1VBtynD-NmfYSi_DKjb0Os0335sbK4E"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"title","value":"Node.js back-end debugging process","description":"<p>Title of the Blog</p>\n","type":"text"},{"key":"content","value":"Node.js Debugging Tools\nNode.js provides a range of debugging tools and techniques to debug back-end applications. Here are some of the popular ones:\n\n1. Console.log()\nConsole.log() is one of the most basic and widely used debugging techniques in Node.js. It is a simple function that logs messages to the console, which can be used to trace the execution flow and identify bugs. For example:\n\n2. Debugger Statement\nDebugger statement is a built-in Node.js debugger that stops the execution of code at a specific point and allows you to inspect variables, call stack, and execute code line by line. For example:3. Node.js Debug Module\nThe Node.js debug module is a powerful tool that provides a range of debugging options, including:\n\nBreakpoints\nConditional breakpoints\nWatch expressions\nStepping over, into, and out of functions\nHere is an example of how to use the debug module:\n\n3. Node.js Debug Module\nThe Node.js debug module is a powerful tool that provides a range of debugging options, including:\n\nBreakpoints\nConditional breakpoints\nWatch expressions\nStepping over, into, and out of functions\nHere is an example of how to use the debug module:\n\n","description":"<p>Actual content of the Post. It may contain plain HTML</p>\n","type":"text"},{"key":"tags","value":"programming, algorithm, prototype, javascript","description":"<p>Tags are comma separated</p>\n","type":"text"},{"key":"thumbnail","description":"<p>Thumbnail of the post. Max file size is 5 MB and only accepts Image files</p>\n","type":"file","src":"/home/saad/Pictures/1_scB2tAgi95VnhXf8BgjzOg.png"}]},"url":"http://localhost:3000/blogs/","description":"<p>This API endpoint allows users to create a new blog post. Users need to provide the title, content, tags, and an optional thumbnail image for the blog post. Authentication using a bearer token is required to access this endpoint.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>POST http://localhost:3000/blogs/</code></p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/blogs/' \\\n--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEwNzE5ZWZlLTBmNzgtNGY4Ni05Mzc3LTVkODA0ZGVkZWNkZiIsImVtYWlsIjoic2FhZC5oYXNhbjJAZ21haWwuY29tIiwidHlwZSI6ImFjY2VzcyIsImlhdCI6MTcwODUxNzQyNCwiZXhwIjoxNzA4NTIxMDI0fQ.S_5xMUuiSg__qbup6N9cWpIuQerEvE0B9uVANgmISh0' \\\n--form 'title=\"Title\"' \\\n--form 'content=\"Hello\"' \\\n--form 'tags=\"[\\\"a\\\"]\"' \\\n--form 'thumbnail=@\"/home/saad/Pictures/-2147483648_-220821.jpg\"'\n\n</code></pre>\n<h3 id=\"request-body-parameters\">Request Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>title</td>\n<td>The title of the blog post.</td>\n</tr>\n<tr>\n<td>content</td>\n<td>The content of the blog post.</td>\n</tr>\n<tr>\n<td>tags</td>\n<td>An array of tags associated with the blog post.</td>\n</tr>\n<tr>\n<td>thumbnail</td>\n<td>An optional thumbnail image for the blog post.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"success\",\n    \"message\": \"Blog created successfully\",\n    \"blog\": {\n        \"id\": \"7a5c4621f80d70b159bc\",\n        \"title\": \"Title\",\n        \"content\": \"Hello\",\n        \"thumbnail\": \"thumbnail-1708518003904-328901220.jpg\",\n        \"author\": {\n            \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n            \"firstName\": \"Saad\",\n            \"lastName\": \"Hasan\",\n            \"avatar\": null\n        },\n        \"tags\": [\n            \"a\"\n        ],\n        \"likes\": 0,\n        \"comments\": []\n    }\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<ul>\n<li><p><strong>status</strong> (string): Indicates the status of the request.</p>\n</li>\n<li><p><strong>message</strong> (string): A message indicating the outcome of the request.</p>\n</li>\n<li><p><strong>blog</strong> (object): Information about the created blog post.</p>\n<ul>\n<li><p><strong>id</strong> (string): The unique identifier of the blog post.</p>\n</li>\n<li><p><strong>title</strong> (string): The title of the blog post.</p>\n</li>\n<li><p><strong>content</strong> (string): The content of the blog post.</p>\n</li>\n<li><p><strong>thumbnail</strong> (string, nullable): The filename of the uploaded thumbnail image.</p>\n</li>\n<li><p><strong>author</strong> (object): Information about the author of the blog post.</p>\n<ul>\n<li><p><strong>id</strong> (string): The unique identifier of the author.</p>\n</li>\n<li><p><strong>firstName</strong> (string): The first name of the author.</p>\n</li>\n<li><p><strong>lastName</strong> (string): The last name of the author.</p>\n</li>\n<li><p><strong>avatar</strong> (string, nullable): URL to the author's avatar image.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>tags</strong> (array): An array of tags associated with the blog post.</p>\n</li>\n<li><p><strong>likes</strong> (integer): The number of likes received by the blog post.</p>\n</li>\n<li><p><strong>comments</strong> (array): An array of comments posted on the blog post.</p>\n</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"path":["blogs",""],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"3c21c239-f743-4066-a8a2-cc003cccc032"},{"name":"Get Single Blog","id":"67700847-e104-44e9-8376-23de78211fc4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1YWZmMzg5ZjE4MjJhNWU5ZjQzIiwiZW1haWwiOiJzYWxhaHVkZGluQGxlYXJud2l0aHN1bWl0LmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3MDkzMDYwMjksImV4cCI6MTcwOTMwNjA4OX0.I0WW3KBpNz3W1VBtynD-NmfYSi_DKjb0Os0335sbK4E"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/blogs/4321b782f360f58c8c89","description":"<p>This API endpoint allows users to retrieve a specific blog post by its unique identifier (ID). Users can use this endpoint to fetch detailed information about a particular blog post.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET http://localhost:3000/blogs/{{blog_id}}</code></p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/blogs/{{blog_id}}' \\\n--data ''\n\n</code></pre>\n<h3 id=\"request-body-parameters\">Request Body Parameters</h3>\n<ul>\n<li>No request body parameters required.</li>\n</ul>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"2fe4e76d3c093004d58f\",\n    \"title\": \" async/await a good idea? 🤔 async/await vs promises\",\n    \"content\": \"Understanding Promises 🤝\\nBefore the advent of async/await, Promises were the go-to solution for handling asynchronous operations in JavaScript. A Promise in JavaScript is an object representing the eventual completion or failure of an asynchronous operation. It allows you to attach callbacks instead of using nested callbacks in a complex phenomenon often referred to as \\\"callback hell.\\\"\",\n    \"thumbnail\": \"thumbnail-1708704068214-912948094.jpeg\",\n    \"author\": {\n        \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n        \"firstName\": \"Saad\",\n        \"lastName\": \"Hasan\",\n        \"avatar\": \"avatar-1708589704280-90672434.jpeg\"\n    },\n    \"tags\": [\n        \"async\",\n        \"js\",\n        \"javascript\"\n    ],\n    \"likes\": [],\n    \"comments\": [],\n    \"createdAt\": \"2024-02-23T16:01:08.230Z\"\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<ul>\n<li><strong>id</strong> (string): The unique identifier of the blog post.</li>\n<li><strong>title</strong> (string): The title of the blog post.</li>\n<li><strong>content</strong> (string): The content of the blog post.</li>\n<li><strong>thumbnail</strong> (string): The filename of the thumbnail image associated with the blog post.</li>\n<li><strong>author</strong> (object): Information about the author of the blog post.<ul>\n<li><strong>id</strong> (string): The unique identifier of the author.</li>\n<li><strong>firstName</strong> (string): The first name of the author.</li>\n<li><strong>lastName</strong> (string): The last name of the author.</li>\n<li><strong>avatar</strong> (string): The filename of the author's avatar image.</li>\n</ul>\n</li>\n<li><strong>tags</strong> (array): An array of tags associated with the blog post.</li>\n<li><strong>likes</strong> (array): An array of users who have liked the blog post.</li>\n<li><strong>comments</strong> (array): An array of comments posted on the blog post.</li>\n<li><strong>createdAt</strong> (string): The timestamp indicating when the blog post was created.</li>\n</ul>\n","urlObject":{"path":["blogs","4321b782f360f58c8c89"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"67700847-e104-44e9-8376-23de78211fc4"},{"name":"Update Blog","event":[{"listen":"test","script":{"id":"947ca1f8-78f9-4734-953b-801e51c5ca90","exec":[""],"type":"text/javascript"}}],"id":"0b4ef549-e52f-4a93-b6a5-179c5bae3112","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1YWZmMzg5ZjE4MjJhNWU5ZjQzIiwiZW1haWwiOiJzYWxhaHVkZGluQGxlYXJud2l0aHN1bWl0LmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3MDkzMDYwMjksImV4cCI6MTcwOTMwNjA4OX0.I0WW3KBpNz3W1VBtynD-NmfYSi_DKjb0Os0335sbK4E"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"formdata","formdata":[{"key":"thumbnail","description":"<p>Update Thumbnail. Only Images are allowed and Maximum file size is 5 MB.</p>\n","type":"file","value":null},{"key":"title","value":"","description":"<p>Optional Text Field to update Blog Title</p>\n","type":"text"},{"key":"content","value":"","description":"<p>Optional Text Field to update Blog Content</p>\n","type":"text"},{"key":"tags","value":"","description":"<p>Optional Text Field to update Blog Tags. Tags should be comma separated</p>\n","type":"text"}]},"url":"http://localhost:3000/blogs/2d716ab74691a2c5c964","description":"<p>This API endpoint allows users to update an existing blog post. Users must provide the blog ID in the URL to specify the blog post they want to update. Authentication using a bearer token is required to access this endpoint. Users can update the thumbnail, title, content, and tags of the blog post.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>PATCH http://localhost:3000/blogs/</code></p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location --request PATCH 'http://localhost:3000/blogs/2d716ab74691a2c5c964' \\\n--header &amp;#x27;Authorization: Bearer &lt;access_token&gt;&amp;#x27; \\\n--form 'thumbnail=@\"/path/to/file\"' \\\n--form 'title=\"\"' \\\n--form 'content=\"\"' \\\n--form 'tags=\"\"'\n\n</code></pre>\n<h3 id=\"form-data-description\">Form Data Description</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field Name</th>\n<th>Description</th>\n<th>Field Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>thumbnail</td>\n<td>Update Thumbnail. Only images are allowed, max size 5 MB.</td>\n<td>File</td>\n</tr>\n<tr>\n<td>title</td>\n<td>Optional. Text field to update the blog title.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>content</td>\n<td>Optional. Text field to update the blog content.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>tags</td>\n<td>Optional. Text field to update blog tags (comma-separated).</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<p>Upon successfully updating the blog post, the API returns the updated details of the blog post.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"2d716ab74691a2c5c964\",\n    \"title\": \"New JavaScript Version is Available\",\n    \"content\": \"Hello\",\n    \"thumbnail\": \"test\",\n    \"author\": {\n        \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n        \"firstName\": \"Saad\",\n        \"lastName\": \"Hasan\",\n        \"avatar\": null\n    },\n    \"tags\": [\n        \"a\"\n    ],\n    \"likes\": 0,\n    \"comments\": []\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<ul>\n<li><p><strong>id</strong> (string): The unique identifier of the blog post.</p>\n</li>\n<li><p><strong>title</strong> (string): The updated title of the blog post.</p>\n</li>\n<li><p><strong>content</strong> (string): The updated content of the blog post.</p>\n</li>\n<li><p><strong>thumbnail</strong> (string): The filename of the updated thumbnail image associated with the blog post.</p>\n</li>\n<li><p><strong>author</strong> (object): Information about the author of the blog post.</p>\n<ul>\n<li><p><strong>id</strong> (string): The unique identifier of the author.</p>\n</li>\n<li><p><strong>firstName</strong> (string): The first name of the author.</p>\n</li>\n<li><p><strong>lastName</strong> (string): The last name of the author.</p>\n</li>\n<li><p><strong>avatar</strong> (string): The filename of the author's avatar image.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>tags</strong> (array): An array of updated tags associated with the blog post.</p>\n</li>\n<li><p><strong>likes</strong> (integer): The number of likes on the blog post.</p>\n</li>\n<li><p><strong>comments</strong> (array): An array of comments posted on the blog post.</p>\n</li>\n</ul>\n","urlObject":{"path":["blogs","2d716ab74691a2c5c964"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"0b4ef549-e52f-4a93-b6a5-179c5bae3112"},{"name":"Delete Blog","id":"7276e1f5-77b8-4d9a-bf5c-a90628e8757f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1YWZmMzg5ZjE4MjJhNWU5ZjQzIiwiZW1haWwiOiJzYWxhaHVkZGluQGxlYXJud2l0aHN1bWl0LmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3MDkzMDYwMjksImV4cCI6MTcwOTMwNjA4OX0.I0WW3KBpNz3W1VBtynD-NmfYSi_DKjb0Os0335sbK4E"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/blogs/2d716ab74691a2c5c964","description":"<p>This API endpoint allows users to delete an existing blog post. Users must provide the blog ID in the URL to specify the blog post they want to delete. Authentication using a bearer token is required to access this endpoint.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>DELETE http://localhost:3000/blogs/</code></p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location --request DELETE 'http://localhost:3000/blogs/2d716ab74691a2c5c964' \\\n--header &amp;#x27;Authorization: Bearer &lt;access_token&gt;&amp;#x27;\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<p>Upon successfully deleting the blog post, the API returns a success message.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Blog deleted successfully\"\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>message</td>\n<td>A message confirming successful deletion of the blog post.</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["blogs","2d716ab74691a2c5c964"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"7276e1f5-77b8-4d9a-bf5c-a90628e8757f"},{"name":"Get Blogs","id":"2897a572-6829-4303-89c2-d3942e08b3c9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/blogs?page=1","description":"<p>This API endpoint allows users to retrieve a list of blogs. Users can specify the page number using the <code>page</code> query parameter to paginate through the blog posts. By default, if the <code>page</code> parameter is not provided, the default page is set to 1. Each response will contain 10 blogs by default. Users can also specify the maximum number of blogs to retrieve using the <code>limit</code> query parameter.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET http://localhost:3000/blogs?page=</code></p>\n<h2 id=\"query-parameters\">Query Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Default Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>page</td>\n<td>The page parameter allows you to specify the page number of blogs that the API will retrieve.</td>\n<td>1</td>\n</tr>\n<tr>\n<td>limit</td>\n<td>The limit parameter allows you to specify the maximum number of blogs that the API will retrieve.</td>\n<td>10</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/blogs?page=1'\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<p>Upon successfully retrieving the blog posts, the API returns a list of blogs along with metadata.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"total\": 13,\n    \"page\": 1,\n    \"limit\": 10,\n    \"blogs\": [\n        {\n            \"id\": \"4787eebfbc2645e977c9\",\n            \"title\": \"Title\",\n            \"content\": \"Hello...\",\n            \"thumbnail\": null,\n            \"author\": {\n                \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n                \"firstName\": \"Saad\",\n                \"lastName\": \"Hasan\",\n                \"avatar\": null\n            },\n            \"tags\": \"javascript, async\",\n            \"likes\": [],\n            \"comments\": []\n        },\n        // ... more blogs\n    ]\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>total</td>\n<td>The total number of blog posts available.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>page</td>\n<td>The current page number of the retrieved blogs.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>limit</td>\n<td>The maximum number of blogs per page.</td>\n<td>Integer</td>\n</tr>\n<tr>\n<td>blogs</td>\n<td>An array containing the blog posts.</td>\n<td>Array of Objects</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["blogs"],"host":["http://localhost:3000"],"query":[{"disabled":true,"description":{"content":"<p>The limit parameter allows you to specify the maximum number of blogs that the API will retrieve. By default, the limit is set to 10</p>\n","type":"text/plain"},"key":"limit","value":""},{"description":{"content":"<p>The page parameter allows you to specify the page number of blogs that the API will retrieve. By default, If page parameter is not provided default page is 1</p>\n","type":"text/plain"},"key":"page","value":"1"}],"variable":[]}},"response":[],"_postman_id":"2897a572-6829-4303-89c2-d3942e08b3c9"},{"name":"Like","id":"6cb3ebf8-3712-4c57-a199-00a68a0dc5b8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1YWZmMzg5ZjE4MjJhNWU5ZjQzIiwiZW1haWwiOiJzYWxhaHVkZGluQGxlYXJud2l0aHN1bWl0LmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3MDkzMDYwMjksImV4cCI6MTcwOTMwNjA4OX0.I0WW3KBpNz3W1VBtynD-NmfYSi_DKjb0Os0335sbK4E"}]},"isInherited":false},"method":"POST","header":[],"url":"http://localhost:3000/blogs/7c12b4b48531bcc995ae/like","description":"<p>This endpoint allows users to like a specific blog post. Upon successful execution, the response will indicate whether the blog post has been liked, and provide an array of likes.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<p>This POST request does not require a request body.</p>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li><code>isLiked</code> (boolean): Indicates whether the blog post has been liked.</li>\n<li><code>likes</code> (array): An array of likes for the specified blog post.</li>\n</ul>\n<p>Example response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"isLiked\": true,\n    \"likes\": [\n        {\n            \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\"\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"path":["blogs","7c12b4b48531bcc995ae","like"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"6cb3ebf8-3712-4c57-a199-00a68a0dc5b8"}],"id":"df18cbc7-767c-42b9-93af-b645a70d4717","description":"<p>With the available endpoints under the <code>/blogs</code> route, users have the flexibility to perform CRUD operations on the Blog Collection, as well as interact with individual blog posts by commenting, marking as favorite, and unfavoriting them.</p>\n","_postman_id":"df18cbc7-767c-42b9-93af-b645a70d4717"},{"name":"Profile","item":[{"name":"Single Profile","id":"c2f74abb-711f-4c0a-b8c9-8d0d5fe62e34","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/profile/3d2dde4b6548275fb066","description":"<p>This API endpoint allows users to retrieve their profile information, including details about their account, favorites, authored blogs, and more. Users must provide their user ID in the URL to access their profile information. Authentication using a bearer token is required to access this endpoint.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET http://localhost:3000/profile/</code></p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/profile/10719efe-0f78-4f86-9377-5d804dedecdf' \\\n--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEwNzE5ZWZlLTBmNzgtNGY4Ni05Mzc3LTVkODA0ZGVkZWNkZiIsImVtYWlsIjoic2FhZC5oYXNhbjJAZ21haWwuY29tIiwidHlwZSI6ImFjY2VzcyIsImlhdCI6MTcwODc1MjIwNCwiZXhwIjoxNzA4NzU1ODA0fQ.D7HaXWO12MgGX9kHqxtk5oMPcenGb_sv48YCKZJneWk'\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<p>Upon successfully retrieving the user profile information, the API returns details about the user's account, favorites, authored blogs, and more.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n    \"email\": \"saad.hasan2@gmail.com\",\n    \"firstName\": \"Saad\",\n    \"lastName\": \"Hasan\",\n    \"avatar\": \"avatar-1708589704280-90672434.jpeg\",\n    \"favourites\": [\n        {\n            \"id\": \"2fe4e76d3c093004d58f\",\n            \"title\": \" async/await a good idea? 🤔 async/await vs promises\"\n        }\n    ],\n    \"bio\": \"I am Saad Hasan, self-taught Junior Software Developer from Bangladesh. I have been working as a Professional Frontend Developer for the last 1 year, Though I started my Self-Taught Programming Journey In 2014.\",\n    \"blogs\": [\n        {\n            \"id\": \"4787eebfbc2645e977c9\",\n            \"title\": \"Title\",\n            \"content\": \"Hello\",\n            \"thumbnail\": null,\n            \"author\": {\n                \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n                \"firstName\": \"Saad\",\n                \"lastName\": \"Hasan\",\n                \"avatar\": null\n            },\n            \"tags\": \"[\\\"a\\\"]\",\n            \"likes\": 0,\n            \"comments\": []\n        }\n    ]\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>The unique identifier of the user.</td>\n<td>String (UUID)</td>\n</tr>\n<tr>\n<td>email</td>\n<td>The email address associated with the user's account.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>firstName</td>\n<td>The first name of the user.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>lastName</td>\n<td>The last name of the user.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>avatar</td>\n<td>The file name of the user's avatar image.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>favourites</td>\n<td>An array containing details of the user's favorite blog posts.</td>\n<td>Array of Objects</td>\n</tr>\n<tr>\n<td>bio</td>\n<td>The biography or description provided by the user.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>blogs</td>\n<td>An array containing details of the blog posts authored by the user.</td>\n<td>Array of Objects</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["profile","3d2dde4b6548275fb066"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"c2f74abb-711f-4c0a-b8c9-8d0d5fe62e34"},{"name":"Update Profile","id":"422d616e-894a-4418-97b9-f8d13b59676d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1YWZmMzg5ZjE4MjJhNWU5ZjQzIiwiZW1haWwiOiJzYWxhaHVkZGluQGxlYXJud2l0aHN1bWl0LmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3MDkzMDYwMjksImV4cCI6MTcwOTMwNjA4OX0.I0WW3KBpNz3W1VBtynD-NmfYSi_DKjb0Os0335sbK4E"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"formdata","formdata":[{"key":"firstName","value":"Saad","description":"<p>The updated first name of the user.</p>\n","type":"text"},{"key":"lastName","value":"Hasan","description":"<p>The updated last name of the user</p>\n","type":"text"},{"key":"bio","value":"I am Saad Hasan, self-taught Junior Software Developer from Bangladesh. I have been working as a Professional Frontend Developer for the last 1 year, Though I started my Self-Taught Programming Journey In 2014.","description":"<p>The updated biography of the user</p>\n","type":"text","disabled":true},{"key":"avatar","description":"<p>The updated avatar image of the user.</p>\n","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/home/saad/Pictures/-2147483648_-220821.jpg"],"src":"/home/saad/Pictures/-2147483648_-220821.jpg","disabled":true}]},"url":"http://localhost:3000/profile","description":"<p>This API endpoint allows users to update their profile information, including first name, last name, biography, and avatar image. Users must provide their bearer token for authentication and the updated profile details. Upon successful update, the API returns a message confirming the profile update along with the updated user profile information.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>PATCH http://localhost:3000/profile</code></p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location --request PATCH 'http://localhost:3000/profile' \\\n--header &amp;#x27;Authorization: Bearer &lt;access_token&gt;&amp;#x27; \\\n--form 'firstName=\"Saad\"' \\\n--form 'lastName=\"Hasan\"' \\\n--form 'bio=\"I am Saad Hasan, self-taught Junior Software Developer from Bangladesh. I have been working as a Professional Frontend Developer for the last 1 year, Though I started my Self-Taught Programming Journey In 2014.\"' \\\n--form 'avatar=@\"/home/saad/Pictures/-2147483648_-220821.jpg\"'\n\n</code></pre>\n<h3 id=\"form-data-parameters\">Form Data Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>firstName</td>\n<td>The updated first name of the user.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>lastName</td>\n<td>The updated last name of the user.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>bio</td>\n<td>The updated biography or description of the user.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>avatar</td>\n<td>The updated avatar image file of the user.</td>\n<td>File</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<p>Upon successfully updating the user profile information, the API returns a success message along with the updated user profile details.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"User profile updated successfully\",\n    \"user\": {\n        \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n        \"email\": \"saad.hasan2@gmail.com\",\n        \"firstName\": \"Saad\",\n        \"lastName\": \"Hasan\",\n        \"avatar\": \"avatar-1708754588198-999077549.jpeg\",\n        \"favourites\": [\n            {\n                \"id\": \"2fe4e76d3c093004d58f\",\n                \"title\": \" async/await a good idea? 🤔 async/await vs promises\"\n            }\n        ],\n        \"bio\": \"I am Saad Hasan, self-taught Junior Software Developer from Bangladesh. I have been working as a Professional Frontend Developer for the last 1 year, Though I started my Self-Taught Programming Journey In 2014.\"\n    }\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>message</td>\n<td>A message indicating the success of the operation.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>user</td>\n<td>An object containing the updated user profile information.</td>\n<td>Object</td>\n</tr>\n<tr>\n<td>id</td>\n<td>The unique identifier of the user.</td>\n<td>String (UUID)</td>\n</tr>\n<tr>\n<td>email</td>\n<td>The email address associated with the user's account.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>firstName</td>\n<td>The updated first name of the user.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>lastName</td>\n<td>The updated last name of the user.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>avatar</td>\n<td>The file name of the user's updated avatar image.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>favourites</td>\n<td>An array containing details of the user's favorite blog posts.</td>\n<td>Array of Objects</td>\n</tr>\n<tr>\n<td>bio</td>\n<td>The updated biography or description provided by the user.</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["profile"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"422d616e-894a-4418-97b9-f8d13b59676d"},{"name":"Upload Profile Picture","id":"581e7f65-2226-459f-819e-d7ec0bb8d74b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1YWZmMzg5ZjE4MjJhNWU5ZjQzIiwiZW1haWwiOiJzYWxhaHVkZGluQGxlYXJud2l0aHN1bWl0LmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3MDkzMDYwMjksImV4cCI6MTcwOTMwNjA4OX0.I0WW3KBpNz3W1VBtynD-NmfYSi_DKjb0Os0335sbK4E"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"avatar","description":"<p>The updated avatar image of the user.</p>\n","type":"file","src":"/home/saad/Pictures/1685414706221.jpeg"}]},"url":"http://localhost:3000/profile/avatar","description":"<p>This API endpoint allows users to update their avatar image. Users must provide their bearer token for authentication and the path to the new avatar image file. Upon successful upload, the API returns a message confirming the avatar update along with the updated user profile information.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>POST http://localhost:3000/profile/avatar</code></p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/profile/avatar' \\\n--header &amp;#x27;Authorization: Bearer &lt;access_token&gt;&amp;#x27; \\\n--form 'avatar=@\"/home/saad/Pictures/22261152.jpeg\"'\n\n</code></pre>\n<h3 id=\"form-data-parameters\">Form Data Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>avatar</td>\n<td>The new avatar image file to upload.</td>\n<td>File</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<p>Upon successfully uploading the new avatar image, the API returns a success message along with the updated user profile information.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Avatar uploaded successfully\",\n    \"user\": {\n        \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n        \"email\": \"saad.hasan2@gmail.com\",\n        \"firstName\": \"Saad\",\n        \"lastName\": \"Hasan\",\n        \"avatar\": \"avatar-1708754588198-999077549.jpeg\",\n        \"favourites\": [\n            {\n                \"id\": \"2fe4e76d3c093004d58f\",\n                \"title\": \" async/await a good idea? 🤔 async/await vs promises\"\n            }\n        ],\n        \"bio\": \"I am Saad Hasan, self-taught Junior Software Developer from Bangladesh. I have been working as a Professional Frontend Developer for the last 1 year, Though I started my Self-Taught Programming Journey In 2014.\"\n    }\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>message</td>\n<td>A message indicating the success of the operation.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>user</td>\n<td>An object containing the updated user profile information.</td>\n<td>Object</td>\n</tr>\n<tr>\n<td>id</td>\n<td>The unique identifier of the user.</td>\n<td>String (UUID)</td>\n</tr>\n<tr>\n<td>email</td>\n<td>The email address associated with the user's account.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>firstName</td>\n<td>The first name of the user.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>lastName</td>\n<td>The last name of the user.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>avatar</td>\n<td>The file name of the user's new avatar image.</td>\n<td>String</td>\n</tr>\n<tr>\n<td>favourites</td>\n<td>An array containing details of the user's favorite blog posts.</td>\n<td>Array of Objects</td>\n</tr>\n<tr>\n<td>bio</td>\n<td>The biography or description provided by the user.</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["profile","avatar"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"581e7f65-2226-459f-819e-d7ec0bb8d74b"}],"id":"1e5bab76-30c9-408d-87b7-18bf7037d949","_postman_id":"1e5bab76-30c9-408d-87b7-18bf7037d949","description":""},{"name":"Images","item":[{"name":"Blog Thumbnail","id":"5229ab42-a148-4e4a-ae2f-fe86bfbcf0bb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/uploads/blog/thumbnail-1708703405446-607606083.jpeg","description":"<h3 id=\"get-blog-thumbnail-image\">Get Blog Thumbnail Image</h3>\n<p>This endpoint allows users to retrieve blog thumbnail image by providing the URL of the image.</p>\n<h4 id=\"endpoint\">Endpoint</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /uploads/blog/thumbnail-1708589704280-90672434.jpeg\n\n</code></pre><h4 id=\"request\">Request</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/uploads/blog/thumbnail-1708589704280-90672434.jpeg'\n\n</code></pre>\n<h4 id=\"description\">Description</h4>\n<p>This endpoint retrieves the blog thumbnail image associated with the user's profile. The image is served in JPEG format.</p>\n<h4 id=\"response\">Response</h4>\n<p>The response is the binary data of the image in JPEG format.</p>\n<h4 id=\"example\">Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/uploads/avatar/avatar-1708589704280-90672434.jpeg' -O\n\n</code></pre>\n","urlObject":{"path":["uploads","blog","thumbnail-1708703405446-607606083.jpeg"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"5229ab42-a148-4e4a-ae2f-fe86bfbcf0bb"},{"name":"Avatar","id":"3468e294-59fc-49fe-99e6-9ba28ecafe33","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/uploads/avatar/avatar-1708589704280-90672434.jpeg","description":"<h3 id=\"get-avatar-image\">Get Avatar Image</h3>\n<p>This endpoint allows users to retrieve their avatar image by providing the URL of the image.</p>\n<h4 id=\"endpoint\">Endpoint</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /uploads/avatar/avatar-1708589704280-90672434.jpeg\n\n</code></pre><h4 id=\"request\">Request</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/uploads/avatar/avatar-1708589704280-90672434.jpeg'\n\n</code></pre>\n<h4 id=\"description\">Description</h4>\n<p>This endpoint retrieves the avatar image associated with the user's profile. The image is served in JPEG format.</p>\n<h4 id=\"response\">Response</h4>\n<p>The response is the binary data of the image in JPEG format.</p>\n<h4 id=\"example\">Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/uploads/avatar/avatar-1708589704280-90672434.jpeg' -O\n\n</code></pre>\n","urlObject":{"path":["uploads","avatar","avatar-1708589704280-90672434.jpeg"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"3468e294-59fc-49fe-99e6-9ba28ecafe33"}],"id":"b875fc3d-65f9-4f33-bc4e-44e0f6a00e0d","description":"<p>Developers has to show the uploaded images. There is two type of paths of image. In this section you will learn more about how to show images into your website</p>\n","_postman_id":"b875fc3d-65f9-4f33-bc4e-44e0f6a00e0d"},{"name":"Search","id":"0944f000-81d9-45e5-ab7a-66022a7bff72","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1YWZmMzg5ZjE4MjJhNWU5ZjQzIiwiZW1haWwiOiJzYWxhaHVkZGluQGxlYXJud2l0aHN1bWl0LmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3MDkzMDYwMjksImV4cCI6MTcwOTMwNjA4OX0.I0WW3KBpNz3W1VBtynD-NmfYSi_DKjb0Os0335sbK4E"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/search?q=await","description":"<p>This API endpoint allows users to search for blog posts based on a query string. Users can provide a search query using the <code>q</code> parameter in the URL. Authentication using a bearer token is required to access this endpoint.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET http://localhost:3000/search?q={query}</code></p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'http://localhost:3000/search?q=await' \\\n--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEwNzE5ZWZlLTBmNzgtNGY4Ni05Mzc3LTVkODA0ZGVkZWNkZiIsImVtYWlsIjoic2FhZC5oYXNhbjJAZ21haWwuY29tIiwidHlwZSI6ImFjY2VzcyIsImlhdCI6MTcwODcwMTc5MywiZXhwIjoxNzA4NzA1MzkzfQ.J6mH8CDp3ybwoCCk9BuykLUrwHYmorIqnSHaCGZ_Iy4'\n\n</code></pre>\n<h3 id=\"request-parameters\">Request Parameters</h3>\n<ul>\n<li><strong>q</strong> (string): The search query.</li>\n</ul>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"length\": 2,\n    \"query\": \"await\",\n    \"data\": [\n        {\n            \"id\": \"1b18c0a27c245aea0312\",\n            \"title\": \" async/await a good idea? 🤔 async/await vs promises\",\n            \"content\": \"Undemplex phenomenon often referred to as \\\"callback hell.\\\"\",\n            \"thumbnail\": \"thumbnail-1708704041451-647757489.jpeg\",\n            \"author\": {\n                \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n                \"firstName\": \"Saad\",\n                \"lastName\": \"Hasan\",\n                \"avatar\": \"avatar-1708589704280-90672434.jpeg\"\n            },\n            \"tags\": [\n                \"async\",\n                \"js\",\n                \"javascript\"\n            ],\n            \"likes\": [],\n            \"comments\": [],\n            \"createdAt\": \"2024-02-23T16:00:41.463Z\"\n        },\n        {\n            \"id\": \"2fe4e76d3c093004d58f\",\n            \"title\": \" async/await a good idea? 🤔 async/await vs promises\",\n            \"content\": \"\",\n            \"thumbnail\": \"thumbnail-1708704068214-912948094.jpeg\",\n            \"author\": {\n                \"id\": \"10719efe-0f78-4f86-9377-5d804dedecdf\",\n                \"firstName\": \"Saad\",\n                \"lastName\": \"Hasan\",\n                \"avatar\": \"avatar-1708589704280-90672434.jpeg\"\n            },\n            \"tags\": [\n                \"async\",\n                \"js\",\n                \"javascript\"\n            ],\n            \"likes\": [],\n            \"comments\": [],\n            \"createdAt\": \"2024-02-23T16:01:08.230Z\"\n        }\n    ]\n}\n\n</code></pre>\n<h3 id=\"response-body-parameters\">Response Body Parameters</h3>\n<ul>\n<li><p><strong>length</strong> (integer): The number of blog posts matching the search query.</p>\n</li>\n<li><p><strong>query</strong> (string): The search query.</p>\n</li>\n<li><p><strong>data</strong> (array): An array of blog posts matching the search query. Each object in the array contains detailed information about a blog post.</p>\n<ul>\n<li><strong>id</strong> (string): The unique identifier of the blog post.</li>\n<li><strong>title</strong> (string): The title of the blog post.</li>\n<li><strong>content</strong> (string): The content of the blog post.</li>\n<li><strong>thumbnail</strong> (string): The filename of the thumbnail image associated with the blog post.</li>\n<li><strong>author</strong> (object): Information about the author of the blog post.<ul>\n<li><strong>id</strong> (string): The unique identifier of the author.</li>\n<li><strong>firstName</strong> (string): The first name of the author.</li>\n<li><strong>lastName</strong> (string): The last name of the author.</li>\n<li><strong>avatar</strong> (string): The filename of the author's avatar image.</li>\n</ul>\n</li>\n<li><strong>tags</strong> (array): An array of tags associated with the blog post.</li>\n<li><strong>likes</strong> (array): An array of users who have liked the blog post.</li>\n<li><strong>comments</strong> (array): An array of comments posted on the blog post.</li>\n<li><strong>createdAt</strong> (string): The timestamp indicating when the blog post was created.</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"path":["search"],"host":["http://localhost:3000"],"query":[{"key":"q","value":"await"}],"variable":[]}},"response":[],"_postman_id":"0944f000-81d9-45e5-ab7a-66022a7bff72"}],"event":[{"listen":"prerequest","script":{"id":"7786c840-8b32-469c-835b-d5b4bedc903c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"3be426a0-2dae-43f6-bb8d-530550eced0a","type":"text/javascript","exec":[""]}}],"variable":[{"key":"BASE_URL","value":"http://localhost:3000","type":"string"},{"key":"ACCESS_TOKEN","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1YWZmMzg5ZjE4MjJhNWU5ZjQzIiwiZW1haWwiOiJzYWxhaHVkZGluQGxlYXJud2l0aHN1bWl0LmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3MDkzMDYwMjksImV4cCI6MTcwOTMwNjA4OX0.I0WW3KBpNz3W1VBtynD-NmfYSi_DKjb0Os0335sbK4E"},{"key":"REFRESH_TOKEN","value":""}]}