Prerequisites:
Maven 3.4.2+ Java 17+ Postman
Booting Up the Application:
1. Clone the repository:
git clone https://github.com/tanto2/nwassignment
2. Navigate to the folder:
cd nwassignment
3. Import the project in STS
Import project -> Existing Maven Projects -> <browse projects> -> Select aggregated-social-score -> Finish
4. Select aggregated-social-score -> Run As -> SpringBoot App
5. Open Postman, use the below urls for testing
If using jar:
1. Download and run in terminal
java -jar aggregated-social-score-0.0.1-SNAPSHOT.jar
2. Open Postman, use the below urls for testing
Testing:
- Create article
• URL: http://127.0.0.1:8080/article
• HTTP Method: POST
• Body { "url": "http://www.rte.ie/news/politics/2018/1004/1001034-cso/", "engagement": 20, "location": "ie" }
{ "url": "https://www.irishtimes.com/opinion/cartoon/2025/martyn-turner/", "engagement": 50, "location": "ie" }
{ "url":"https://www.rte.ie/news/weather/2025/0110/1007-weather-cold-snap/", "engagement": 60, "location": "ie" }
{ "url": "https://elpais.com/cultura/festival-de-musica-de-canarias/", "engagement": 10, "location": "es" }
- Given a country, provide the aggregated social score for the domains in the system ranked by social score
• URL: http://127.0.0.1:8080/report/{location}
Ex: localhost:8080/report/ie
• HTTP Method: GET
- Delete article based on url
• URL: http://127.0.0.1:8080/article?url={url}
• Ex: localhost:8080/article?url=http%3A%2F%2Fwww.rte.ie%2Fnews%2Fpolitics%2F2018%2F1004%2F1001034-cso%2F
• HTTP Method: DELETE


