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 - Java Tutorial
From the course: Calling REST APIs with Java
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Twitter API5m 56s
-
(Locked)
Twitter API registration and security7m 34s
-
(Locked)
Calling APIs with Spring2m 15s
-
(Locked)
Spring WebClient7m 44s
-
(Locked)
Streaming APIs1m 39s
-
(Locked)
Calling Twitter Streaming API with Spring WebClient8m 21s
-
(Locked)
Challenge: Twitter API3m 22s
-
(Locked)
Solution: Twitter API7m 6s
-
(Locked)
-
-