#1 initial sending media files support
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-09-12 01:35:23 +03:00
parent 5bb9e3abab
commit 2103d03611
20 changed files with 369 additions and 25 deletions

View File

@@ -0,0 +1,28 @@
package ru.penkrat.stbf.api;
import lombok.Builder;
import lombok.Getter;
import lombok.ToString;
import java.util.function.Supplier;
@Getter
@Builder
@ToString(of = {"mediaType", "url"})
public class Media {
private MediaType mediaType;
private String url;
private String fileId;
private Supplier<byte[]> data;
private Integer duration;
private Integer width;
private Integer height;
}

View File

@@ -0,0 +1,9 @@
package ru.penkrat.stbf.api;
public enum MediaType {
ANIMATION,
AUDIO,
PHOTO,
VIDEO,
VOICE
}

View File

@@ -2,13 +2,17 @@ package ru.penkrat.stbf.api;
public interface Screen {
String getText();
String getText();
default Keyboard getKeyboard() {
return null;
}
default Media getMedia() {
return null;
}
default ScreenProperties getScreenProperties() {
return ScreenProperties.DEFAULT;
}
default Keyboard getKeyboard() {
return null;
}
default ScreenProperties getScreenProperties() {
return ScreenProperties.DEFAULT;
}
}