aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <donaldshan1@outlook.com>2023-04-15 02:27:08 -0700
committerPinapelz <donaldshan1@outlook.com>2023-04-15 02:33:00 -0700
commit287e120472bd98c5436492fb67b349cf95d55ba5 (patch)
tree937a5f692ddbd7d100a9cae7ccdf34b1afa2478e
parent643250ad2a67f677c43e24bfe764ac0483086bb6 (diff)
Updated README, bump version, remove imports
-rw-r--r--README.md34
-rw-r--r--pom.xml2
-rw-r--r--src/main/java/com/pina/Holodex.java6
3 files changed, 33 insertions, 9 deletions
diff --git a/README.md b/README.md
index dd80bdd..d680914 100644
--- a/README.md
+++ b/README.md
@@ -28,10 +28,33 @@ List<Channel> nijisanjiMembers = holodex.getChannels(channelQuery);
Video anotherVideo = holodex.getVideo(new VideoByVideoIdQueryBuilder().setVideoId("9-O_IWM3184").setLang("en"));
System.out.println(anotherVideo.channel.name + " uploaded a video titled " + anotherVideo.title +
" on " + anotherVideo.published_at);
+
+// SEARCHING THROUGH VIDEOS AND COMMENTS
+Object srv = holodex.searchVideo(new VideoSearchQueryBuilder().setOrg(List.of("Nijisanji")).setSort("newest").
+setTarget(List.of("stream")).setPaginated(false).setLimit(10).setOffset(0)
+.setTopic(List.of("singing"))
+);
+System.out.println("--- Search Results ---");
+for (SimpleVideo video : (List<SimpleVideo>) srv) {
+System.out.println(video.title + " - " + video.channel.name);
+}
+
+
+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));
+System.out.println("--- Search Results for comments containing kw: "+word+" ---");
+for (SimpleCommentVideo video : (List<SimpleCommentVideo>) scr) {
+System.out.println(video.title + " - " + video.channel.name);
+for (Comment comment : video.comments) {
+System.out.println(" "+comment.message);
+}
+}
```
## Download
-Maven
+[![](https://jitpack.io/v/pinapelz/JHolodex.svg)](https://jitpack.io/#pinapelz/JHolodex)
+### Maven
```xml
<dependency>
<groupId>com.github.pinapelz</groupId>
@@ -40,4 +63,11 @@ Maven
</dependency>
```
-[Holodex License](https://docs.holodex.net/docs/holodex/8166fcec5dbe2-license)
+### Gradle
+```gradle
+dependencies {
+ implementation 'com.github.pinapelz:JHolodex:Tag'
+}
+```
+#### Add [JitPack](https://jitpack.io/) to your list of repositories
+#### [Holodex License](https://docs.holodex.net/docs/holodex/8166fcec5dbe2-license)
diff --git a/pom.xml b/pom.xml
index dc1f511..ad1e5a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.pinapelz</groupId>
<artifactId>jholodex</artifactId>
- <version>0.05</version>
+ <version>0.1</version>
<name>JHolodex</name>
<url>http://maven.apache.org</url>
<properties>
diff --git a/src/main/java/com/pina/Holodex.java b/src/main/java/com/pina/Holodex.java
index eca6147..900b05a 100644
--- a/src/main/java/com/pina/Holodex.java
+++ b/src/main/java/com/pina/Holodex.java
@@ -11,13 +11,7 @@ import retrofit2.Call;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.jackson.JacksonConverterFactory;
-
-import javax.xml.transform.Result;
import java.io.IOException;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage