aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/App.java
blob: ce2dc8060c7a33998e896143f396e47b495fdaee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import com.pina.Holodex;
import com.pina.HolodexException;
import com.pina.datatypes.Video;
import com.pina.query.LiveStreamsQueryBuilder;

import java.util.List;

public class App
{
    public static void main( String[] args )
    {
        Holodex holodex = new Holodex();
        try {
            LiveStreamsQueryBuilder query = new LiveStreamsQueryBuilder();
            query.setStatus("live");
            query.setOrg("WACTOR");
            List<Video> videos = holodex.getLiveStreams(query);
            for (Video stream : videos) {
                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