The RSS reader tutorial (Step 3)
Now that Vert.x 3.6.0 has been released, it’s the perfect time to conclude our Vert.x Cassandra Client tutorial!
In the previous step, we have successfully implemented the second endpoint of the RSS reader app.
The RSS reader example assumes implementing three endpoints. This article is dedicated to implementing the last GET /articles/by_rss_link?link={rss_link}
endpoint.
Before completing this step, make sure your are in the step_3
git branch:
Implementing the 3rd endpoint
The 3rd endpoint serves a list of articles related to a specific RSS channel. In a request, we specify RSS channel by providing a link. On the application side, after receiving a request we execute the following query:
Implementation
For obtaining articles by RSS link we need to prepare a related statement first. Change AppVerticle#prepareSelectArticlesByRssLink
in this way:
And now, we can implement the AppVerticle#getArticles
method. Basically, it will use the selectArticlesByRssLink
statement for finding articles by the given link. Here’s the implementation:
Conclusion
During the series, we have shown how the RSS reader app can be implemented with the Vert.x Cassandra client.
Thanks for reading this. I hope you enjoyed this series. See you soon on our Gitter channel!