aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/App.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/App.java')
-rw-r--r--src/main/java/App.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/App.java b/src/main/java/App.java
index 73691fb..8e1090f 100644
--- a/src/main/java/App.java
+++ b/src/main/java/App.java
@@ -1,6 +1,7 @@
import com.pina.Holodex;
import com.pina.HolodexException;
import com.pina.LiveStream;
+import com.pina.query.LiveStreamsQueryBuilder;
import java.util.List;
@@ -10,9 +11,12 @@ public class App
{
Holodex holodex = new Holodex();
try {
- List<LiveStream> liveStreams = holodex.getLiveStreams();
+ LiveStreamsQueryBuilder query = new LiveStreamsQueryBuilder();
+ query.setChannelId("UCBQd84IW8OvM8H5jftHdvmw");
+ query.setStatus("live");
+ List<LiveStream> liveStreams = holodex.getLiveStreams(query);
for (LiveStream stream : liveStreams) {
- System.out.println(stream.title + " by " + stream.channel.name);
+ System.out.println(stream.title + " is live with " + stream.live_viewers + " viewers" + stream.id);
}
} catch (HolodexException e) {
System.err.println("Failed to get live streams: " + e.getMessage());
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage