Update Telegram api docs

This commit is contained in:
Rubenlagus 2016-05-31 19:08:56 +02:00
parent d1d8c74c98
commit e4b92fd0ad
2 changed files with 36 additions and 2 deletions

View File

@ -28,6 +28,12 @@ public class Chat implements IBotApiObject {
private static final String CHANNELCHATTYPE = "channel"; private static final String CHANNELCHATTYPE = "channel";
private static final String SUPERGROUPCHATTYPE = "supergroup"; private static final String SUPERGROUPCHATTYPE = "supergroup";
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
/**
* Unique identifier for this chat.
* This number may be greater than 32 bits and some programming languages may
* have difficulty/silent defects in interpreting it. But it smaller than 52 bits,
* so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
*/
private Long id; ///< Unique identifier for this chat, not exciding 1e13 by absolute value private Long id; ///< Unique identifier for this chat, not exciding 1e13 by absolute value
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private String type; ///< Type of the chat, one of private, group or channel private String type; ///< Type of the chat, one of private, group or channel

View File

@ -111,12 +111,40 @@ public class Message implements IBotApiObject {
@JsonProperty(CAPTION_FIELD) @JsonProperty(CAPTION_FIELD)
private String caption; ///< Optional. Caption for the document, photo or video, 0-200 characters private String caption; ///< Optional. Caption for the document, photo or video, 0-200 characters
@JsonProperty(SUPERGROUPCREATED_FIELD) @JsonProperty(SUPERGROUPCREATED_FIELD)
private Boolean superGroupCreated; ///< Optional. Informs that the supergroup has been created /**
* Optional. Service message: the supergroup has been created.
* This field cant be received in a message coming through updates,
* because bot cant be a member of a supergroup when it is created.
* It can only be found in reply_to_message
* if someone replies to a very first message in a directly created supergroup.
*/
private Boolean superGroupCreated;
@JsonProperty(CHANNELCHATCREATED_FIELD) @JsonProperty(CHANNELCHATCREATED_FIELD)
private Boolean channelChatCreated; ///< Optional. Informs that the channel has been created /**
* Optional. Service message: the channel has been created.
* This field cant be received in a message coming through updates,
* because bot cant be a member of a channel when it is created.
* It can only be found in reply_to_message if someone
* replies to a very first message in a channel.
*/
private Boolean channelChatCreated;
@JsonProperty(MIGRATETOCHAT_FIELD) @JsonProperty(MIGRATETOCHAT_FIELD)
/**
* Optional. The group has been migrated to a supergroup with the specified identifier.
* This number may be greater than 32 bits and some programming languages
* may have difficulty/silent defects in interpreting it.
* But it smaller than 52 bits, so a signed 64 bit integer or double-precision
* float type are safe for storing this identifier.
*/
private Long migrateToChatId; ///< Optional. The chat has been migrated to a chat with specified identifier, not exceeding 1e13 by absolute value private Long migrateToChatId; ///< Optional. The chat has been migrated to a chat with specified identifier, not exceeding 1e13 by absolute value
@JsonProperty(MIGRATEFROMCHAT_FIELD) @JsonProperty(MIGRATEFROMCHAT_FIELD)
/**
* Optional. The supergroup has been migrated from a group with the specified identifier.
* This number may be greater than 32 bits and some programming languages
* may have difficulty/silent defects in interpreting it.
* But it smaller than 52 bits, so a signed 64 bit integer or double-precision
* float type are safe for storing this identifier.
*/
private Long migrateFromChatId; ///< Optional. The chat has been migrated from a chat with specified identifier, not exceeding 1e13 by absolute value private Long migrateFromChatId; ///< Optional. The chat has been migrated from a chat with specified identifier, not exceeding 1e13 by absolute value
@JsonProperty(EDITDATE_FIELD) @JsonProperty(EDITDATE_FIELD)
private Integer editDate; ///< Optional. Date the message was last edited in Unix time private Integer editDate; ///< Optional. Date the message was last edited in Unix time