#1 initial sending media files support
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
28
stbf-api/src/main/java/ru/penkrat/stbf/api/Media.java
Normal file
28
stbf-api/src/main/java/ru/penkrat/stbf/api/Media.java
Normal 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package ru.penkrat.stbf.api;
|
||||
|
||||
public enum MediaType {
|
||||
ANIMATION,
|
||||
AUDIO,
|
||||
PHOTO,
|
||||
VIDEO,
|
||||
VOICE
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user