From the course: Calling REST APIs with Java

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Twitter API

Challenge: Twitter API - Java Tutorial

From the course: Calling REST APIs with Java

Start my 1-month free trial

Challenge: Twitter API

(upbeat music) - [Instructor] Now it's your turn to tackle a programming challenge using spring's web client and the Twitter streaming API. In this challenge, you will be asked to establish a connection to Twitter's filtered stream endpoint using the spring web client. Once you've connected to the stream, you'll send tweets mentioning the Landon Hotel to Azure cognitive services for sentiment analysis. In the working files, you'll find the Twitter streaming service class. This class contains a method named stream. Within this method, you're going to build a web client, make the connection to the stream and then return a flux that emits the tweets as a string. You can see that within the class, I've injected the bearer token for the Twitter API. You'll need to make sure that you have this environment variable established on your workstation. You'll also need to keep in mind that we've already registered roles with the…

Contents