forked from j62/ctbrec
Add webhook post-processor skeleton
This commit is contained in:
parent
30021d184d
commit
87d88b5bcb
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue