Files
TikTokLiveJava/tools-readme/src/main/java/io/github/jwdeveloper/tiktok/Main2.java
jacek.wolniewicz fed9de3fd0 Due to convention, interfaces should not have TikTok name inside, but they should have prefix Live instead
- rename TikTokMapper to LiveMapper
- rename TikTokLiveMapperHelper to LiveMapperHelper

Create interface:
LiveEventsHandler for TikTokLiveEventHandler
LiveMessagesHandler for TikTokLiveMessageHandler
2024-07-01 23:28:38 +02:00

28 lines
812 B
Java

package io.github.jwdeveloper.tiktok;
import com.google.common.base.Charsets;
import com.google.common.collect.Maps;
import com.google.common.io.Resources;
import com.hubspot.jinjava.Jinjava;
import java.io.IOException;
import java.util.HashMap;
public class Main2 {
public static void main(String[] args) throws IOException {
var version = System.getenv("VERSION");
if (version == null || version.equals("")) {
version = "[Replace with current version]";
}
var template = Resources.toString(Resources.getResource("my-template.html"), Charsets.UTF_8);
var jinjava = new Jinjava();
var context = new HashMap<String, Object>();
context.put("version", version);
var renderedTemplate = jinjava.render(template, context);
}
}