forked from j62/ctbrec
1
0
Fork 0

Add webhook post-processor skeleton

This commit is contained in:
0xb00bface 2020-09-24 11:35:55 +02:00
parent 30021d184d
commit 87d88b5bcb
1 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,37 @@
package ctbrec.recorder.postprocessing;
import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ctbrec.Config;
import ctbrec.NotImplementedExcetion;
import ctbrec.Recording;
import ctbrec.recorder.RecordingManager;
public class Webhook extends AbstractPlaceholderAwarePostProcessor {
private static final Logger LOG = LoggerFactory.getLogger(Webhook.class);
public static final String URL = "webhook.url";
public static final String HEADERS = "webhook.headers";
public static final String METHOD = "webhook.method";
public static final String DATA = "webhook.data";
public static final String SECRET = "webhook.secret";
@Override
public String getName() {
return "webhook";
}
@Override
public void postprocess(Recording rec, RecordingManager recordingManager, Config config) throws IOException, InterruptedException {
throw new NotImplementedExcetion();
}
@Override
public String toString() {
return (getName() + " " + getConfig().getOrDefault(Webhook.URL, "")).trim();
}
}