diff options
| author | Pinapelz <donaldshan1@outlook.com> | 2023-04-29 20:54:57 -0700 |
|---|---|---|
| committer | Pinapelz <donaldshan1@outlook.com> | 2023-04-29 20:54:57 -0700 |
| commit | 37ff6f5574564110fbbb18d4a5786da34bd4a3f5 (patch) | |
| tree | 1cc017e1d428701ddfc423761ffb0f54d8f91e3d /src/main/java/App.java | |
| parent | e524e65bb5525885ca011c5c591583441822d521 (diff) | |
Fixed bug with not being able to pass in singular Orgnization enum
Diffstat (limited to 'src/main/java/App.java')
| -rw-r--r-- | src/main/java/App.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/App.java b/src/main/java/App.java index e55b7a7..de669f8 100644 --- a/src/main/java/App.java +++ b/src/main/java/App.java @@ -9,7 +9,7 @@ import java.util.List; public class App { public static void main(String[] args) { try { - Holodex holodex = new Holodex("YOUR_API_KEY_HERE"); + Holodex holodex = new Holodex("b910328a-0cec-406b-9b15-d4ef1abf4757"); Channel channel = holodex.getChannel("UC4WvIIAo89_AzGUh1AZ6Dkg"); System.out.println(channel.name + " is a member of " + channel.org + " and has " + channel.suborg + " as a suborg"); @@ -24,8 +24,11 @@ public class App { ChannelQueryBuilder channelQuery = new ChannelQueryBuilder(); channelQuery.setOrg(Organization.NIJISANJI); channelQuery.setLimit(75); + List<Channel> nijisanjiMembers = holodex.getChannels(channelQuery); + System.out.println("There are " + nijisanjiMembers.size() + " members in " + Organization.NIJISANJI); + Video anotherVideo = holodex.getVideo(new VideoByVideoIdQueryBuilder().setVideoId("9-O_IWM3184").setLang( List.of(Language.ENGLISH, Language.JAPANESE))); @@ -33,7 +36,7 @@ public class App { " on " + anotherVideo.published_at); // SEARCHING THROUGH VIDEOS AND COMMENTS - Object srv = holodex.searchVideo(new VideoSearchQueryBuilder().setOrg(List.of("Nijisanji")).setSort(Sort.NEWEST). + Object srv = holodex.searchVideo(new VideoSearchQueryBuilder().setOrg(Organization.NIJISANJI).setSort(Sort.NEWEST). setTarget(Type.STREAM).setPaginated(false).setLimit(10).setOffset(0) .setTopic(List.of("singing")) ); @@ -43,8 +46,8 @@ public class App { } System.out.println("\n\n\nNow Searching Comments"); - String word = "Mumei"; - Object scr = holodex.searchComment(new CommentSearchQueryBuilder().setOrg(List.of("Hololive")).setComment(List.of(word)).setLimit(1).setPaginated(false)); + String word = "eating"; + Object scr = holodex.searchComment(new CommentSearchQueryBuilder().setOrg(Organization.NIJISANJI).setComment(List.of(word)).setLimit(1).setPaginated(false)); System.out.println("--- Search Results for comments containing kw: " + word + " ---"); for (SimpleCommentVideo video : (List<SimpleCommentVideo>) scr) { System.out.println(video.title + " - " + video.channel.name); |
