Student project
This API can be started with Maven (mvn clean install), with Docker Compose (docker-compose up -d --build)
or using IntelliJ built-in runner.
Routes marked with [Secured] require a valid JWT token inside the header request.
Here an example:
curl -X GET\
http://localhost:8080/users/me\
-H "Authorization: Bearer <some extra long JWT token>
This route give access to feed resource.
For now, feed resource come with all theirs items (which cannot be fetch alone)
Give access to the list of all feed currently registered.
None
[
{
"uuid": "cd3db99c-5d56-458c-a124-65bd6e6c9389",
"title": "Le Monde.fr - Actualités et Infos en France et dans le monde",
"link": "https://www.lemonde.fr/rss/une.xml",
"sourceFeedUrl": "https://www.lemonde.fr/rss/une.xml",
"copyright": "Le Monde - L'utilisation des flux RSS du Monde.fr est réservée à un usage strictement personnel, non professionnel et non collectif. Toute autre exploitation doit faire l'objet d'une autorisation et donner lieu au versement d'une rémunération. Contact : droitsdauteur@lemonde.fr",
"description": "Le Monde.fr - 1er site d'information. Les articles du journal et toute l'actualité en continu : International, France, Société, Economie, Culture, Environnement, Blogs ...",
"authors": [],
"categories": [],
"contributors": [],
"encoding": null,
"entries": [
{
"id": null,
"feed": null,
"link": "https://www.lemonde.fr/politique/article/2019/04/08/le-bilan-du-grand-debat-en-six-questions_5447417_823448.html?xtor=RSS-3208",
"authors": [],
"categories": [],
"comments": null,
"contributors": [],
"links": [],
"publishedDate": "2019-04-08T10:40:27.000+0000",
"title": "Le bilan du grand débat en six questions",
"updatedDate": null,
"uri": "https://www.lemonde.fr/tiny/5447417/"
},
{...}
],
"feedType": "rss_2.0",
"generator": null,
"language": null,
"links": [],
"publishedDate": "2019-04-08T17:03:12.000+0000",
"styleSheet": null,
"uri": null,
"webMaster": null,
"autoUpdatedDate": null
},
{...}
]Give access to one feed instance currently registered.
None
{
"uuid": "cd3db99c-5d56-458c-a124-65bd6e6c9389",
"title": "Le Monde.fr - Actualités et Infos en France et dans le monde",
"link": "https://www.lemonde.fr/rss/une.xml",
"sourceFeedUrl": "https://www.lemonde.fr/rss/une.xml",
...
"entries": [
{
"link": "https://www.lemonde.fr/politique/article/2019/04/08/le-bilan-du-grand-debat-en-six-questions_5447417_823448.html?xtor=RSS-3208",
...
"publishedDate": "2019-04-08T10:40:27.000+0000",
"title": "Le bilan du grand débat en six questions",
"uri": "https://www.lemonde.fr/tiny/5447417/"
},
{...}
],
...
}Register a new RSS feed. Can only be done by connected users.
{
"url": "https://www.lemonde.fr/rss/une.xml"
} code : 201 Create
Delete one RSS feed already registered . Can only be done by connected administrator.
None
code : 204 No Content
NO Update available -> By default, rss are regularly updated
This route allow registration of a new user and the connection with one valid account.
Create a new user.
{
"username": "test",
"password": "some-really-heavy_password"
} code: 201 Created
Connect a previously registered user.
{
"username": "user",
"password": "some-really-heavy_password"
}{
"username": "user",
"token": "<some extra long JWT token>"
}This route give access to user resource.
Allow connected users to get its own profile.
None
{
"roles": [
"ROLE_USER"
],
"preferredFeeds": [
"cd3db99c-5d56-458c-a124-65bd6e6c9389"
],
"username": "user"
}Allow user to update is preferred feed list.
{
"preferredFeeds": [
"cd3db99c-5d56-458c-a124-65bd6e6c9389"
]
} code : 204 No Content