The API has just 1 endpoint which returns a list of top news sources names (sorted) based upon given parameters.
-
k
Required
Maximum number of records to return
-
country
Country code of News Sources.
be
bg
br
ca
ch
cn
co
cu
cz
de
eg
fr
gb
gr
hk
hu
id
ie
il
in
it
jp
kr
lt
lv
ma
mx
my
ng
nl
no
nz
ph
pl
pt
ro
rs
ru
sa
se
sg
si
sk
th
tr
tw
ua
us
ve
za
Default - All
-
category
Category of news sources
business
entertainment
general
health
science
sports
technology
Default - All
-
Create a new file
src/main/resources/application-local.properties
with following content.server.news.api.url=http://newsapi.org server.news.api.key=<api-key>
-
Run following command to build JAR file.
mvn clean install
-
Run following command to build Docker image and run it as a container.
docker-compose up --build
This project was created to be submitted as an assignment, and is not one of my personal projects.