Removal of examples using Deprecated TikTokEventListener!

This commit is contained in:
kohlerpop1
2024-10-17 21:48:42 -04:00
parent 88e36e7e90
commit e8129862d1
3 changed files with 7 additions and 10 deletions

View File

@@ -38,9 +38,9 @@ import io.github.jwdeveloper.tiktok.live.LiveClient;
* <p>- 2 parameters of (LiveClient, Class extending TikTokEvent) * <p>- 2 parameters of (LiveClient, Class extending TikTokEvent)
* <pre> * <pre>
* {@code * {@code
* public static class CustomListener implements TikTokEventListener * public static class CustomListener
* { * {
* @TikTokEventObserver * @TikTokEventObserver
* public void onError(LiveClient liveClient, TikTokErrorEvent event) * public void onError(LiveClient liveClient, TikTokErrorEvent event)
* { * {
* System.out.println(event.getException().getMessage()); * System.out.println(event.getException().getMessage());
@@ -67,9 +67,7 @@ import io.github.jwdeveloper.tiktok.live.LiveClient;
* } * }
* </pre> * </pre>
*/ */
//TODO I think this interface can be removed, since we are using, @Deprecated(forRemoval = true, since = "1.8.1 (This interface is not longer needed, please remove it from your class) | Removing in 1.9.0")
//annotation @TikTokEventHandler to check methods that are events
@Deprecated(forRemoval = true, since = "1.8.1 (This interface is not longer needed, please remove it from your class)")
public interface TikTokEventListener { public interface TikTokEventListener {
} }

View File

@@ -57,8 +57,7 @@ public interface LiveClientBuilder extends EventsBuilder<LiveClientBuilder> {
LiveClientBuilder configure(Consumer<LiveClientSettings> onConfigure); LiveClientBuilder configure(Consumer<LiveClientSettings> onConfigure);
/** /**
* Adding events listener class, its fancy way to register events without using lamda method * Adds events listener class, its fancy way to register events without using lamda method
* but actual method in class that implements TikTokEventListener
* *
* @return * @return
*/ */
@@ -92,4 +91,4 @@ public interface LiveClientBuilder extends EventsBuilder<LiveClientBuilder> {
* @return LiveClient object and connects to TikTok live asynchronously * @return LiveClient object and connects to TikTok live asynchronously
*/ */
CompletableFuture<LiveClient> buildAndConnectAsync(); CompletableFuture<LiveClient> buildAndConnectAsync();
} }

View File

@@ -707,7 +707,7 @@ public static void main(String[] args) throws IOException {
* - second must be class that extending TikTokEvent * - second must be class that extending TikTokEvent
*/ */
public static class CustomListener implements TikTokEventListener { public static class CustomListener {
@TikTokEventObserver @TikTokEventObserver
public void onLike(LiveClient liveClient, TikTokLikeEvent event) { public void onLike(LiveClient liveClient, TikTokLikeEvent event) {
@@ -754,4 +754,4 @@ public static class CustomListener implements TikTokEventListener {
[Library documentation for contributors](https://github.com/jwdeveloper/TikTokLiveJava/wiki) [Library documentation for contributors](https://github.com/jwdeveloper/TikTokLiveJava/wiki)
Your improvements are welcome! Feel free to open an <a href="https://github.com/jwdeveloper/TikTok-Live-Java/issues">issue</a> or <a href="https://github.com/jwdeveloper/TikTok-Live-Java/pulls">pull request</a>. Your improvements are welcome! Feel free to open an <a href="https://github.com/jwdeveloper/TikTok-Live-Java/issues">issue</a> or <a href="https://github.com/jwdeveloper/TikTok-Live-Java/pulls">pull request</a>.