Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a REST API built with Spring Boot #16

Merged
merged 5 commits into from
Nov 4, 2024
Merged

Added a REST API built with Spring Boot #16

merged 5 commits into from
Nov 4, 2024

Conversation

Eukon05
Copy link
Owner

@Eukon05 Eukon05 commented Nov 4, 2024

The API includes the following endpoints:

  • /api/v1/articles, a POST method endpoint accepting ArticleSearchCriteria in the request body. Provides a list of articles fitting the given criteria. Supports pagination with the "page" request parameter.
  • /api/v1/articles/latest, a GET method endpoint returning the latest articles sorted in descending order. Supports pagination with the "page" parameter
  • /api/v1/articles/{id} , returns an article corresponding to the given id.

The API's documentation can be accessed at /api/v1/api-docs, and Swagger UI is available at /api/v1/swagger-ui.html

The app refreshes the article list every 5 minutes (this will be able to be configured in the next commit) and saves them info every DAO on the module path.

…g through the article database. The articles are fetched from all available sources every 30 minutes, and saved to all ArticleDAOs present in the module path.

- Added a fix for HibernateDAO.findById() when fetching a non-existing article. Previously, an NPE would be thrown, now the method simply returns null.
… a simple frontend for infodb

- Created a test directory for the spring module
… objects to identify themselves

- Added an endpoint exposing info about all loaded article sources
- Renamed ApiController to ArticlesController
@Eukon05 Eukon05 added the enhancement New feature or request label Nov 4, 2024
@Eukon05 Eukon05 merged commit 8086109 into prototype Nov 4, 2024
3 checks passed
@Eukon05 Eukon05 deleted the spring branch November 12, 2024 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant