Skip to content

Commit 24b5270

Browse files
committed
Renamed the fields thumb_url and thumb_mime_type to thumbnail_url and thumbnail_mime_type
1 parent fea1ee2 commit 24b5270

File tree

2 files changed

+32
-10
lines changed

2 files changed

+32
-10
lines changed

library/src/main/java/com/pengrad/telegrambot/model/request/InlineQueryResultGif.java

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,22 @@ public class InlineQueryResultGif extends InlineQueryResult<InlineQueryResultGif
1010
private final static long serialVersionUID = 0L;
1111

1212
private String gif_url;
13-
private String thumb_url;
13+
14+
private String thumbnail_url;
15+
private String thumbnail_mime_type;
1416

1517
private Integer gif_width;
1618
private Integer gif_height;
1719
private Integer gif_duration;
18-
private String thumb_mime_type;
20+
1921
private String title;
2022
private String caption;
2123
private String parse_mode;
2224

23-
public InlineQueryResultGif(String id, String gifUrl, String thumbUrl) {
25+
public InlineQueryResultGif(String id, String gifUrl, String thumbnailUrl) {
2426
super("gif", id);
2527
this.gif_url = gifUrl;
26-
this.thumb_url = thumbUrl;
28+
this.thumbnail_url = thumbnailUrl;
2729
}
2830

2931
public InlineQueryResultGif gifWidth(Integer gifWidth) {
@@ -41,8 +43,17 @@ public InlineQueryResultGif gifDuration(Integer gifDuration) {
4143
return this;
4244
}
4345

46+
/**
47+
* @deprecated Use thumbnailMimeType instead
48+
*/
49+
@Deprecated
4450
public InlineQueryResultGif thumbMimeType(String thumbMimeType) {
45-
this.thumb_mime_type = thumbMimeType;
51+
this.thumbnail_mime_type = thumbMimeType;
52+
return this;
53+
}
54+
55+
public InlineQueryResultGif thumbnailMimeType(String thumbnailMimeType) {
56+
this.thumbnail_mime_type = thumbnailMimeType;
4657
return this;
4758
}
4859

library/src/main/java/com/pengrad/telegrambot/model/request/InlineQueryResultMpeg4Gif.java

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,22 @@ public class InlineQueryResultMpeg4Gif extends InlineQueryResult<InlineQueryResu
1010
private final static long serialVersionUID = 0L;
1111

1212
private String mpeg4_url;
13-
private String thumb_url;
13+
14+
private String thumbnail_url;
15+
private String thumbnail_mime_type;
1416

1517
private Integer mpeg4_width;
1618
private Integer mpeg4_height;
1719
private Integer mpeg4_duration;
18-
private String thumb_mime_type;
20+
1921
private String title;
2022
private String caption;
2123
private String parse_mode;
2224

23-
public InlineQueryResultMpeg4Gif(String id, String mpeg4Url, String thumbUrl) {
25+
public InlineQueryResultMpeg4Gif(String id, String mpeg4Url, String thumbnailUrl) {
2426
super("mpeg4_gif", id);
2527
this.mpeg4_url = mpeg4Url;
26-
this.thumb_url = thumbUrl;
28+
this.thumbnail_url = thumbnailUrl;
2729
}
2830

2931
public InlineQueryResultMpeg4Gif mpeg4Width(Integer mpeg4Width) {
@@ -41,8 +43,17 @@ public InlineQueryResultMpeg4Gif mpeg4Duration(Integer mpeg4Duration) {
4143
return this;
4244
}
4345

46+
/**
47+
* @deprecated Use thumbnailMimeType instead
48+
*/
49+
@Deprecated
4450
public InlineQueryResultMpeg4Gif thumbMimeType(String thumbMimeType) {
45-
this.thumb_mime_type = thumbMimeType;
51+
this.thumbnail_mime_type = thumbMimeType;
52+
return this;
53+
}
54+
55+
public InlineQueryResultMpeg4Gif thumbnailMimeType(String thumbnailMimeType) {
56+
this.thumbnail_mime_type = thumbnailMimeType;
4657
return this;
4758
}
4859

0 commit comments

Comments
 (0)