{"info":{"_postman_id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","name":"News Aggregator API","description":"<html><head></head><body><p>RESTful API for a news aggregator service that pulls articles from various</p>\n<p>sources and provides endpoints for a frontend application to consume.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"545561","collectionId":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","publishedId":"2sAYBPnEx3","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-11-17T17:42:58.000Z"},"item":[{"name":"Auth","item":[{"name":"Register","event":[{"listen":"test","script":{"exec":["// Parse the response body to JSON","const response = pm.response.json();","","// Check if the response is successful and contains the token","if (response.success && response.data && response.data.token) {","    // Set the token as a collection variable","    pm.collectionVariables.set(\"authToken\", response.data.token);","    console.log(\"Token saved to collection variable: \", response.data.token);","} else {","    console.log(\"Token not found in the response.\");","}","pm.test(\"Response status code is 400\", function () {","    pm.response.to.have.status(400);","});","","","pm.test(\"Response has the required fields - success, message, and errors\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.success).to.exist;","    pm.expect(responseData.message).to.exist;","    pm.expect(responseData.errors).to.exist;","});","","","pm.test(\"Email field has an error message\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.errors.email).to.exist.and.to.be.an('array').that.is.not.empty;","});","","","pm.test(\"Data object exists in the response\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.have.property('data').that.is.an('object');","    pm.expect(responseData.data).to.have.property('token').that.is.a('string');","    pm.expect(responseData.data).to.have.property('name').that.is.a('string');","});","","","pm.test(\"Token and name fields are present and have correct data type\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.have.property('data').that.is.an('object');","    pm.expect(responseData.data).to.have.property('token').that.is.a('string');","    pm.expect(responseData.data).to.have.property('name').that.is.a('string');","});"],"type":"text/javascript"}}],"id":"546899e5-b0a1-46ec-a671-071058732085","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"User One","type":"text"},{"key":"email","value":"userone@gmail.com","type":"text"},{"key":"password","value":"123456789","type":"text"},{"key":"password_confirmation","value":"123456789","type":"text"}]},"url":"http://46.101.164.194:8000/api/auth/register","description":"<h3 id=\"register-user\">Register User</h3>\n<p>This endpoint allows the user to register with the application.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><code>name</code> (text): The name of the user.</p>\n</li>\n<li><p><code>email</code> (text): The email address of the user.</p>\n</li>\n<li><p><code>password</code> (text): The user's chosen password.</p>\n</li>\n<li><p><code>password_confirmation</code> (text): Confirmation of the user's chosen password.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response is in JSON format and follows the schema below:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"object\",\n    \"properties\": {\n        \"success\": {\n            \"type\": \"boolean\"\n        },\n        \"message\": {\n            \"type\": \"string\"\n        },\n        \"data\": {\n            \"type\": \"object\",\n            \"properties\": {\n                \"token\": {\n                    \"type\": \"string\"\n                },\n                \"name\": {\n                    \"type\": \"string\"\n                }\n            }\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["auth","register"],"host":["http://46.101.164.194:8000/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"546899e5-b0a1-46ec-a671-071058732085"},{"name":"Login","event":[{"listen":"test","script":{"exec":["// Parse the response body to JSON","const response = pm.response.json();","","// Check if the response is successful and contains the token","if (response.success && response.data && response.data.token) {","    // Set the token as a collection variable","    pm.collectionVariables.set(\"authToken\", response.data.token);","    console.log(\"Token saved to collection variable: \", response.data.token);","} else {","    console.log(\"Token not found in the response.\");","}","pm.test(\"Response status code is 200\", function () {","    pm.response.to.have.status(200);","});","","","pm.test(\"Response has the required fields - success, message, and data\", function () {","    const responseData = pm.response.json();","","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.success).to.exist;","    pm.expect(responseData.message).to.exist;","    pm.expect(responseData.data).to.exist;","});","","","pm.test(\"Token is a non-empty string\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.data.token).to.be.a('string').and.to.have.lengthOf.at.least(1, \"Token should not be empty\");","});","","","pm.test(\"Name is a non-empty string\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data.name).to.be.a('string').and.to.have.lengthOf.at.least(1, \"Name should not be empty\");","});","","","pm.test(\"Content-Type header is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});"],"type":"text/javascript"}}],"id":"65db1fc0-e97b-4f52-8ec9-7e671f49b7e9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"email","value":"userone@gmail.com","type":"text"},{"key":"password","value":"123456789","type":"text"}]},"url":"http://46.101.164.194:8000/api/auth/login","description":"<h3 id=\"auth-login\">Auth Login</h3>\n<p>This endpoint allows the user to login and obtain an authentication token.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p>email (text): The email address of the user.</p>\n</li>\n<li><p>password (text): The password for the user account.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response is a JSON object with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"success\": {\n      \"type\": \"boolean\"\n    },\n    \"message\": {\n      \"type\": \"string\"\n    },\n    \"data\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"token\": {\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    }\n  }\n}\n\n</code></pre>\n","urlObject":{"path":["auth","login"],"host":["http://46.101.164.194:8000/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"65db1fc0-e97b-4f52-8ec9-7e671f49b7e9"},{"name":"Forgot Password","event":[{"listen":"test","script":{"exec":["","pm.test(\"Response status code is 200\", function () {","    pm.response.to.have.status(200);","});","","","pm.test(\"Response has the required fields\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.success).to.exist;","    pm.expect(responseData.message).to.exist;","    pm.expect(responseData.data).to.exist;","});","","","pm.test(\"Data token is a non-empty string\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.have.property('data');","    pm.expect(responseData.data.token).to.be.a('string').and.to.have.lengthOf.at.least(1, \"Token should be a non-empty string\");","});","","","pm.test(\"Email is in a valid email format\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.data.token).to.be.a('string');","});","","","pm.test(\"Message is a non-empty string\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.message).to.be.a('string').and.to.have.lengthOf.at.least(1, \"Message should not be empty\");","});"],"type":"text/javascript"}}],"id":"f60385a2-9fc8-4358-be82-aef7be85e556","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"email","value":"userone@gmail.com","type":"text"}]},"url":"http://46.101.164.194:8000/api/auth/forgot-password","description":"<p>This endpoint is used to initiate the process of resetting a user's password by sending a reset link to the provided email address.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li>email (text): The email address for which the password reset link will be sent.</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>The response of this request is documented as a JSON schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"message\": {\n      \"type\": \"string\"\n    }\n  }\n}\n\n</code></pre>\n<p>The response contains a single property:</p>\n<ul>\n<li>message (string): A message indicating the status of the password reset request.</li>\n</ul>\n","urlObject":{"path":["auth","forgot-password"],"host":["http://46.101.164.194:8000/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"f60385a2-9fc8-4358-be82-aef7be85e556"},{"name":"Reset Password","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 400\", function () {","    pm.expect(pm.response.code).to.equal(400);","});","","","pm.test(\"Response has the required fields - success, message, and data\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData).to.have.property('success');","    pm.expect(responseData).to.have.property('message');","    pm.expect(responseData).to.have.property('data');","});","","","pm.test(\"Token error message is present in the response\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.errors.token).to.exist.and.to.be.an('array').that.is.not.empty;","});","","","pm.test(\"Validate response content type is 'application/json'\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Ensure that the response data array is empty\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.have.property('data').that.is.an('array').that.is.empty;","});"],"type":"text/javascript"}}],"id":"f9360b4f-5ae0-41a3-be85-78f4bbb303d5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"token","value":"bea87fcc610c1fd12b5f7d6a5c52b8a0865962ea166a784bb6393f257257244a","type":"text"},{"key":"email","value":"userone@gmail.com","type":"text"},{"key":"password","value":"123456789","type":"text"},{"key":"password_confirmation","value":"123456789","type":"text"}]},"url":"http://46.101.164.194:8000/api/auth/reset-password","description":"<h3 id=\"reset-password\">Reset Password</h3>\n<p>This endpoint is used to reset the password for a user account.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p>token (text, required): The token received by the user to reset the password.</p>\n</li>\n<li><p>email (text, required): The email address of the user.</p>\n</li>\n<li><p>password (text, required): The new password for the user account.</p>\n</li>\n<li><p>password_confirmation (text, required): The confirmation of the new password.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response is a JSON object with the following properties:</p>\n<ul>\n<li><p>success (boolean): Indicates if the password reset was successful.</p>\n</li>\n<li><p>message (string): A message related to the password reset operation.</p>\n</li>\n<li><p>data (array): An empty array as there is no specific data to return.</p>\n</li>\n</ul>\n<h4 id=\"json-schema\">JSON Schema</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"success\": {\n      \"type\": \"boolean\"\n    },\n    \"message\": {\n      \"type\": \"string\"\n    },\n    \"data\": {\n      \"type\": \"array\"\n    }\n  }\n}\n\n</code></pre>\n","urlObject":{"path":["auth","reset-password"],"host":["http://46.101.164.194:8000/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"f9360b4f-5ae0-41a3-be85-78f4bbb303d5"},{"name":"Fetch User","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","    pm.response.to.have.status(200);","});","","","pm.test(\"Content type is application/json\", function () {","  pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Validate 'success' field is a boolean\", function () {","    const responseData = pm.response.json();","","    pm.expect(responseData.success).to.be.a('boolean');","});","","","pm.test(\"Validate the message field is a string\", function () {","  const responseData = pm.response.json();","  ","  pm.expect(responseData.message).to.be.a('string');","});","","","pm.test(\"Validate the 'data' object has the required fields\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.data).to.be.an('object');","    pm.expect(responseData.data).to.have.property('id').that.is.a('number');","    pm.expect(responseData.data).to.have.property('name').that.is.a('string');","    pm.expect(responseData.data).to.have.property('email').that.is.a('string');","    pm.expect(responseData.data).to.have.property('email_verified_at').that.is.oneOf(['string', 'null']);","    pm.expect(responseData.data).to.have.property('created_at').that.is.a('string');","    pm.expect(responseData.data).to.have.property('updated_at').that.is.a('string');","});"],"type":"text/javascript"}}],"id":"373207c9-34b9-4ad0-ba09-e75b2e25a79a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"http://46.101.164.194:8000/api/auth/user","description":"<p>This endpoint makes an HTTP GET request to fetch user authentication details. The response returned is a JSON object with a 200 status code.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"success\": {\n      \"type\": \"boolean\"\n    },\n    \"message\": {\n      \"type\": \"string\"\n    },\n    \"data\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"email_verified_at\": {\n          \"type\": [\"string\", \"null\"]\n        },\n        \"created_at\": {\n          \"type\": \"string\"\n        },\n        \"updated_at\": {\n          \"type\": \"string\"\n        }\n      }\n    }\n  }\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","name":"News Aggregator API","type":"collection"}},"urlObject":{"path":["auth","user"],"host":["http://46.101.164.194:8000/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"373207c9-34b9-4ad0-ba09-e75b2e25a79a"},{"name":"Update Profile","event":[{"listen":"test","script":{"id":"78d7bbc4-c91f-47f7-bb30-42d0305d838a","exec":["pm.test(\"Response status code is 200\", function () {","    pm.response.to.have.status(200);","});","","","pm.test(\"Response has the required fields - success, message, and data\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData.success).to.exist;","    pm.expect(responseData.message).to.exist;","    pm.expect(responseData.data).to.exist;","});","","","pm.test(\"Success is a boolean value\", function () {","    const responseData = pm.response.json();","","    pm.expect(responseData).to.have.property('success').that.is.a('boolean');","});","","","pm.test(\"Message is a string\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.message).to.be.a('string');","});","","","pm.test(\"Data is an array\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.data).to.be.an('array');","});"],"type":"text/javascript","packages":{}}}],"id":"1a98ca0c-4434-41d2-b21f-4130ae44c46c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"name","value":"User One Updated","type":"text"},{"key":"email","value":"userone@gmail.com","type":"text"}]},"url":"http://46.101.164.194:8000/api/auth/update-profile","description":"<h3 id=\"update-profile\">Update Profile</h3>\n<p>This endpoint is used to update the user's profile information.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><code>name</code> (text): The name of the user.</p>\n</li>\n<li><p><code>email</code> (text): The email address of the user.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response is in JSON format and has the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"object\",\n    \"properties\": {\n        \"success\": {\n            \"type\": \"boolean\"\n        },\n        \"message\": {\n            \"type\": \"string\"\n        },\n        \"data\": {\n            \"type\": \"array\"\n        }\n    }\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","name":"News Aggregator API","type":"collection"}},"urlObject":{"path":["auth","update-profile"],"host":["http://46.101.164.194:8000/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"1a98ca0c-4434-41d2-b21f-4130ae44c46c"},{"name":"Change Password","event":[{"listen":"test","script":{"id":"ce67133d-cfd4-400a-af9a-56196dc8fdc5","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"packages":{},"type":"text/javascript"}}],"id":"31cd0d85-0ad0-4c8a-895b-20fdaf4b1548","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"current_password","value":"123456789","type":"text"},{"key":"password","value":"123456789","type":"text"},{"key":"password_confirmation","value":"123456789","type":"text"}]},"url":"http://46.101.164.194:8000/api/auth/change-password","description":"<h3 id=\"change-password\">Change Password</h3>\n<p>This endpoint is used to change the user's password.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p>form-data</p>\n<ul>\n<li><p><code>current_password</code> (text)</p>\n</li>\n<li><p><code>password</code> (text)</p>\n</li>\n<li><p><code>password_confirmation</code> (text)</p>\n</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response of this request can be documented as a JSON schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"object\",\n    \"properties\": {\n        \"success\": {\n            \"type\": \"boolean\"\n        },\n        \"message\": {\n            \"type\": \"string\"\n        },\n        \"data\": {\n            \"type\": \"array\"\n        }\n    }\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","name":"News Aggregator API","type":"collection"}},"urlObject":{"path":["auth","change-password"],"host":["http://46.101.164.194:8000/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"31cd0d85-0ad0-4c8a-895b-20fdaf4b1548"},{"name":"Logout","event":[{"listen":"test","script":{"exec":["pm.test(\"Response status code is 200\", function () {","    pm.response.to.have.status(200);","});","","","pm.test(\"Content-Type header is application/json\", function () {","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");","});","","","pm.test(\"Validate response schema against the expected JSON schema\", function () {","    const expectedSchema = {","        \"type\": \"object\",","        \"properties\": {","            \"success\": {","                \"type\": \"boolean\"","            },","            \"message\": {","                \"type\": \"string\"","            },","            \"data\": {","                \"type\": \"array\"","            }","        }","    };","    ","    pm.expect(pm.response.json()).to.have.jsonSchema(expectedSchema);","});","","","pm.test(\"Success is a boolean type\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.success).to.be.a('boolean');","});","","","pm.test(\"Message should be a string type\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData.message).to.be.a('string');","});"],"type":"text/javascript"}}],"id":"283cbf40-5dee-4687-85d0-a55ed1cf2de9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"http://46.101.164.194:8000/api/auth/logout","description":"<p>This endpoint is used to log out the authenticated user.</p>\n<p>The response of this request can be documented as a JSON schema as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"success\": {\n      \"type\": \"boolean\"\n    },\n    \"message\": {\n      \"type\": \"string\"\n    },\n    \"data\": {\n      \"type\": \"array\"\n    }\n  }\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","name":"News Aggregator API","type":"collection"}},"urlObject":{"path":["auth","logout"],"host":["http://46.101.164.194:8000/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"283cbf40-5dee-4687-85d0-a55ed1cf2de9"}],"id":"9c4d0908-90d1-4d2d-b37e-0b2a9ae6651b","description":"<p>Contains basic auth features</p>\n","_postman_id":"9c4d0908-90d1-4d2d-b37e-0b2a9ae6651b","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","name":"News Aggregator API","type":"collection"}}},{"name":"Articles Public APIs","item":[{"name":"List","id":"a0112c6f-98bf-439d-b3f6-59f70c270c35","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"http://46.101.164.194:8000/api/articles?page=1&keyword=business&category=47&author=Tom Garry&source=theguardian.com&date_from=2024-01-01&date_to=2024-11-30","description":"<h3 id=\"get-articles\">GET /articles</h3>\n<p>This endpoint retrieves a list of articles based on the provided parameters.</p>\n<h4 id=\"request-parameters\">Request Parameters</h4>\n<ul>\n<li><p><code>page</code> (integer): The page number for paginated results.</p>\n</li>\n<li><p><code>keyword</code> (string): The keyword to search for in the articles.</p>\n</li>\n<li><p><code>category</code> (integer): The category ID for filtering articles.</p>\n</li>\n<li><p><code>author</code> (string): The author's name for filtering articles.</p>\n</li>\n<li><p><code>source</code> (string): The source of the articles.</p>\n</li>\n<li><p><code>date_from</code> (string): The starting date for filtering articles.</p>\n</li>\n<li><p><code>date_to</code> (string): The ending date for filtering articles.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will be in JSON format with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"success\": {\n      \"type\": \"boolean\"\n    },\n    \"message\": {\n      \"type\": \"string\"\n    },\n    \"data\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"current_page\": {\n          \"type\": \"integer\"\n        },\n        \"data\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"id\": {\n                \"type\": \"integer\"\n              },\n              \"title\": {\n                \"type\": \"string\"\n              },\n              \"content\": {\n                \"type\": \"string\"\n              },\n              \"author\": {\n                \"type\": \"string\"\n              },\n              \"category_id\": {\n                \"type\": \"integer\"\n              },\n              \"source\": {\n                \"type\": \"string\"\n              },\n              \"published_at\": {\n                \"type\": \"string\"\n              },\n              \"created_at\": {\n                \"type\": \"string\"\n              },\n              \"updated_at\": {\n                \"type\": \"string\"\n              },\n              \"category\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"id\": {\n                    \"type\": \"integer\"\n                  },\n                  \"name\": {\n                    \"type\": \"string\"\n                  },\n                  \"created_at\": {\n                    \"type\": \"string\"\n                  },\n                  \"updated_at\": {\n                    \"type\": \"string\"\n                  }\n                }\n              }\n            }\n          }\n        },\n        \"first_page_url\": {\n          \"type\": \"string\"\n        },\n        \"from\": {\n          \"type\": \"integer\"\n        },\n        \"last_page\": {\n          \"type\": \"integer\"\n        },\n        \"last_page_url\": {\n          \"type\": \"string\"\n        },\n        \"links\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"url\": {\n                \"type\": \"string\"\n              },\n              \"label\": {\n                \"type\": \"string\"\n              },\n              \"active\": {\n                \"type\": \"boolean\"\n              }\n            }\n          }\n        },\n        \"next_page_url\": {\n          \"type\": \"string\"\n        },\n        \"path\": {\n          \"type\": \"string\"\n        },\n        \"per_page\": {\n          \"type\": \"integer\"\n        },\n        \"prev_page_url\": {\n          \"type\": \"string\"\n        },\n        \"to\": {\n          \"type\": \"integer\"\n        },\n        \"total\": {\n          \"type\": \"integer\"\n        }\n      }\n    }\n  }\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","name":"News Aggregator API","type":"collection"}},"urlObject":{"path":["articles"],"host":["http://46.101.164.194:8000/api"],"query":[{"key":"page","value":"1"},{"key":"keyword","value":"business"},{"key":"category","value":"47"},{"key":"author","value":"Tom Garry"},{"key":"source","value":"theguardian.com"},{"key":"date_from","value":"2024-01-01"},{"key":"date_to","value":"2024-11-30"}],"variable":[]}},"response":[],"_postman_id":"a0112c6f-98bf-439d-b3f6-59f70c270c35"},{"name":"Article By ID","id":"45a0c6bc-d3ea-41cd-8e99-9b2a8e2bcd35","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"http://46.101.164.194:8000/api/articles/1353","description":"<p>The endpoint retrieves the details of a specific article with the given ID.</p>\n<p>The response of the request can be documented as a JSON schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"success\": {\n      \"type\": \"boolean\"\n    },\n    \"message\": {\n      \"type\": \"string\"\n    },\n    \"data\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\"\n        },\n        \"title\": {\n          \"type\": \"string\"\n        },\n        \"content\": {\n          \"type\": \"string\"\n        },\n        \"author\": {\n          \"type\": \"string\"\n        },\n        \"category_id\": {\n          \"type\": \"integer\"\n        },\n        \"source\": {\n          \"type\": \"string\"\n        },\n        \"published_at\": {\n          \"type\": \"string\"\n        },\n        \"created_at\": {\n          \"type\": \"string\"\n        },\n        \"updated_at\": {\n          \"type\": \"string\"\n        },\n        \"category\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"created_at\": {\n              \"type\": \"string\"\n            },\n            \"updated_at\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","name":"News Aggregator API","type":"collection"}},"urlObject":{"path":["articles","1353"],"host":["http://46.101.164.194:8000/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"45a0c6bc-d3ea-41cd-8e99-9b2a8e2bcd35"}],"id":"6ba62124-de98-4244-900c-906c6b4f6597","_postman_id":"6ba62124-de98-4244-900c-906c6b4f6597","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","name":"News Aggregator API","type":"collection"}}},{"name":"User Preferences","item":[{"name":"Options","id":"6dfb6fb8-dd92-4c15-a878-5853f10cd973","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"http://46.101.164.194:8000/api/preferences/options","description":"<p>The <code>GET</code> request to <code>/preferences/options</code> endpoint retrieves the preferences options.</p>\n<h3 id=\"response\">Response</h3>\n<p>The response is a JSON object with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"success\": {\n      \"type\": \"boolean\"\n    },\n    \"message\": {\n      \"type\": \"string\"\n    },\n    \"data\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"authors\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        },\n        \"sources\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        },\n        \"categories\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"id\": {\n                \"type\": \"integer\"\n              },\n              \"name\": {\n                \"type\": \"string\"\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n</code></pre>\n","urlObject":{"path":["preferences","options"],"host":["http://46.101.164.194:8000/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6dfb6fb8-dd92-4c15-a878-5853f10cd973"},{"name":"Personalised Feed","id":"495ecf01-8006-4ae5-a6c8-0b197af366ae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"http://46.101.164.194:8000/api/preferences/feed","description":"<h3 id=\"get-preferencesfeed\">GET /preferences/feed</h3>\n<p>This endpoint retrieves the preferences feed.</p>\n<h4 id=\"response\">Response</h4>\n<p>The response for this request is a JSON object with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"success\": {\n      \"type\": \"boolean\"\n    },\n    \"message\": {\n      \"type\": \"string\"\n    },\n    \"data\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"current_page\": {\n          \"type\": \"integer\"\n        },\n        \"data\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"id\": {\n                \"type\": \"integer\"\n              },\n              \"title\": {\n                \"type\": \"string\"\n              },\n              \"content\": {\n                \"type\": \"string\"\n              },\n              \"author\": {\n                \"type\": \"string\"\n              },\n              \"category_id\": {\n                \"type\": \"integer\"\n              },\n              \"source\": {\n                \"type\": \"string\"\n              },\n              \"published_at\": {\n                \"type\": \"string\"\n              },\n              \"created_at\": {\n                \"type\": \"string\"\n              },\n              \"updated_at\": {\n                \"type\": \"string\"\n              },\n              \"category\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"id\": {\n                    \"type\": \"integer\"\n                  },\n                  \"name\": {\n                    \"type\": \"string\"\n                  },\n                  \"created_at\": {\n                    \"type\": \"string\"\n                  },\n                  \"updated_at\": {\n                    \"type\": \"string\"\n                  }\n                }\n              }\n            }\n          }\n        },\n        \"first_page_url\": {\n          \"type\": \"string\"\n        },\n        \"from\": {\n          \"type\": \"integer\"\n        },\n        \"last_page\": {\n          \"type\": \"integer\"\n        },\n        \"last_page_url\": {\n          \"type\": \"string\"\n        },\n        \"links\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"url\": {\n                \"type\": \"string\"\n              },\n              \"label\": {\n                \"type\": \"string\"\n              },\n              \"active\": {\n                \"type\": \"boolean\"\n              }\n            }\n          }\n        },\n        \"next_page_url\": {\n          \"type\": \"string\"\n        },\n        \"path\": {\n          \"type\": \"string\"\n        },\n        \"per_page\": {\n          \"type\": \"integer\"\n        },\n        \"prev_page_url\": {\n          \"type\": \"string\"\n        },\n        \"to\": {\n          \"type\": \"integer\"\n        },\n        \"total\": {\n          \"type\": \"integer\"\n        }\n      }\n    }\n  }\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","name":"News Aggregator API","type":"collection"}},"urlObject":{"path":["preferences","feed"],"host":["http://46.101.164.194:8000/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"495ecf01-8006-4ae5-a6c8-0b197af366ae"},{"name":"Get Preferences","id":"e25e407f-230d-45d4-b694-2061220ca0f8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"http://46.101.164.194:8000/api/preferences","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","name":"News Aggregator API","type":"collection"}},"urlObject":{"path":["preferences"],"host":["http://46.101.164.194:8000/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e25e407f-230d-45d4-b694-2061220ca0f8"},{"name":"Update Preferences","id":"d8dd682a-6a90-4479-af70-b7be699c5d84","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"categories\":[47],\n    \"sources\":[\"theguardian.com\"],\n    \"authors\":[\"Tom Garry\"]\n}","options":{"raw":{"language":"json"}}},"url":"http://46.101.164.194:8000/api/preferences","description":"<p>The <code>PUT</code> request updates the user's preferences at the specified endpoint <code>http://46.101.164.194:8000/api/preferences</code>. The request payload is in raw format and includes the following parameters:</p>\n<ul>\n<li><p><code>categories</code> (array of integers) - Specifies the preferred categories.</p>\n</li>\n<li><p><code>sources</code> (array of strings) - Specifies the preferred sources.</p>\n</li>\n<li><p><code>authors</code> (array of strings) - Specifies the preferred authors.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>The response to this request is in JSON format with a status code of 200 and a content type of <code>application/json</code>. The response body follows the schema below:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"success\": {\n      \"type\": \"boolean\"\n    },\n    \"message\": {\n      \"type\": \"string\"\n    },\n    \"data\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"categories\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"integer\"\n          }\n        },\n        \"sources\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        },\n        \"authors\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    }\n  }\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","name":"News Aggregator API","type":"collection"}},"urlObject":{"path":["preferences"],"host":["http://46.101.164.194:8000/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"d8dd682a-6a90-4479-af70-b7be699c5d84"}],"id":"347fc4bf-5e16-4504-802f-dfcf44d8f619","_postman_id":"347fc4bf-5e16-4504-802f-dfcf44d8f619","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","id":"b45bedae-c557-4cd6-9685-5b5263d3cdbd","name":"News Aggregator API","type":"collection"}}}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]}},"event":[{"listen":"prerequest","script":{"id":"8f92532a-e298-4cfe-b654-157bdb2fb0af","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"fca19e60-71e9-4350-b308-0fff5ef25e68","type":"text/javascript","packages":{},"exec":[""]}}],"variable":[{"key":"BASE_URL_LOCAL","value":"http://46.101.164.194:8000/api","type":"string"},{"key":"authToken","value":""}]}