Merge branch 'master' of https://github.com/flicus/TelegramBots into flicus-master
This commit is contained in:
commit
ccfadfb910
@ -24,9 +24,17 @@
|
||||
<processorPath useClasspath="true" />
|
||||
<module name="BotAPi" />
|
||||
</profile>
|
||||
<profile default="false" name="Annotation profile for TelegramBots" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<processorPath useClasspath="true" />
|
||||
<module name="TelegramBots" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel target="1.8">
|
||||
<module name="BotAPi" target="1.8" />
|
||||
<module name="TelegramBots" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
</project>
|
@ -50,6 +50,9 @@
|
||||
<option vars="true" />
|
||||
<option white="true" />
|
||||
</component>
|
||||
<component name="JnetxGlobalBuildDir">
|
||||
<option name="globalBuildDir" value="$PROJECT_DIR$/../TelegramBots\build" />
|
||||
</component>
|
||||
<component name="JsBowerSettings">
|
||||
<exe-path>/usr/local/bin/bower</exe-path>
|
||||
<config-path />
|
||||
|
@ -9,7 +9,7 @@
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="jdk" jdkName="1.8.0_45" jdkType="JavaSDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jersey.containers:jersey-container-grizzly2-http:2.22.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.hk2.external:javax.inject:2.4.0-b31" level="project" />
|
||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
<packaging>jar</packaging>
|
||||
<groupId>org.telegram</groupId>
|
||||
<artifactId>telegrambots</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>1.1</version>
|
||||
|
||||
<name>Telegram Bots</name>
|
||||
<description>Easy to use library to create Telegram Bots</description>
|
||||
|
@ -1,6 +1,8 @@
|
||||
package org.telegram.telegrambots;
|
||||
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.conn.ssl.NoopHostnameVerifier;
|
||||
|
@ -135,4 +135,15 @@ public class AnswerInlineQuery extends BotApiMethod<Boolean> {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AnswerInlineQuery{" +
|
||||
"inlineQueryId='" + inlineQueryId + '\'' +
|
||||
", results=" + results +
|
||||
", cacheTime=" + cacheTime +
|
||||
", isPersonal=" + isPersonal +
|
||||
", nextOffset='" + nextOffset + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -89,4 +89,13 @@ public class ForwardMessage extends BotApiMethod<Message> {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ForwardMessage{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", fromChatId=" + fromChatId +
|
||||
", messageId=" + messageId +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -71,4 +71,11 @@ public class GetFile extends BotApiMethod<File> {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GetFile{" +
|
||||
"fileId='" + fileId + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -47,4 +47,6 @@ public class GetMe extends BotApiMethod<User> {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -74,4 +74,13 @@ public class GetUpdates implements IToJson {
|
||||
}
|
||||
return jsonObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GetUpdates{" +
|
||||
"offset=" + offset +
|
||||
", limit=" + limit +
|
||||
", timeout=" + timeout +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -99,4 +99,13 @@ public class GetUserProfilePhotos extends BotApiMethod<UserProfilePhotos> {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GetUserProfilePhotos{" +
|
||||
"userId=" + userId +
|
||||
", offset=" + offset +
|
||||
", limit=" + limit +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -101,4 +101,18 @@ public class SendAudio {
|
||||
public String getAudioName() {
|
||||
return audioName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendAudio{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", audio='" + audio + '\'' +
|
||||
", replayToMessageId=" + replayToMessageId +
|
||||
", replayMarkup=" + replayMarkup +
|
||||
", performer='" + performer + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", isNewAudio=" + isNewAudio +
|
||||
", audioName='" + audioName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -83,4 +83,12 @@ public class SendChatAction extends BotApiMethod<Boolean>{
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendChatAction{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", action='" + action + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -73,4 +73,16 @@ public class SendDocument {
|
||||
public void setReplayMarkup(ReplyKeyboard replayMarkup) {
|
||||
this.replayMarkup = replayMarkup;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendDocument{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", document='" + document + '\'' +
|
||||
", replayToMessageId=" + replayToMessageId +
|
||||
", replayMarkup=" + replayMarkup +
|
||||
", isNewDocument=" + isNewDocument +
|
||||
", documentName='" + documentName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -120,4 +120,15 @@ public class SendLocation extends BotApiMethod<Message> {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendLocation{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", latitude=" + latitude +
|
||||
", longitude=" + longitude +
|
||||
", replayToMessageId=" + replayToMessageId +
|
||||
", replayMarkup=" + replayMarkup +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -153,4 +153,16 @@ public class SendMessage extends BotApiMethod<Message> {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendMessage{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", text='" + text + '\'' +
|
||||
", parseMode='" + parseMode + '\'' +
|
||||
", disableWebPagePreview=" + disableWebPagePreview +
|
||||
", replayToMessageId=" + replayToMessageId +
|
||||
", replayMarkup=" + replayMarkup +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -84,4 +84,17 @@ public class SendPhoto {
|
||||
this.isNewPhoto = true;
|
||||
this.photoName = photoName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendPhoto{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", photo='" + photo + '\'' +
|
||||
", caption='" + caption + '\'' +
|
||||
", replayToMessageId=" + replayToMessageId +
|
||||
", replayMarkup=" + replayMarkup +
|
||||
", isNewPhoto=" + isNewPhoto +
|
||||
", photoName='" + photoName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -73,4 +73,16 @@ public class SendSticker {
|
||||
public String getStickerName() {
|
||||
return stickerName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendSticker{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", sticker='" + sticker + '\'' +
|
||||
", replayToMessageId=" + replayToMessageId +
|
||||
", replayMarkup=" + replayMarkup +
|
||||
", isNewSticker=" + isNewSticker +
|
||||
", stickerName='" + stickerName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -95,4 +95,18 @@ public class SendVideo {
|
||||
this.isNewVideo = true;
|
||||
this.videoName = videoName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendVideo{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", video='" + video + '\'' +
|
||||
", duration=" + duration +
|
||||
", caption='" + caption + '\'' +
|
||||
", replayToMessageId=" + replayToMessageId +
|
||||
", replayMarkup=" + replayMarkup +
|
||||
", isNewVideo=" + isNewVideo +
|
||||
", videoName='" + videoName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -28,4 +28,15 @@ public class SendVoice {
|
||||
public SendVoice() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendVoice{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", audio='" + audio + '\'' +
|
||||
", replayToMessageId=" + replayToMessageId +
|
||||
", replayMarkup=" + replayMarkup +
|
||||
", duration=" + duration +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -36,4 +36,12 @@ public class SetWebhook {
|
||||
public void setCertificateFile(String certificateFile) {
|
||||
this.certificateFile = certificateFile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SetWebhook{" +
|
||||
"url='" + url + '\'' +
|
||||
", certificateFile='" + certificateFile + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -131,4 +131,16 @@ public class Audio implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Audio{" +
|
||||
"fileId='" + fileId + '\'' +
|
||||
", duration=" + duration +
|
||||
", mimeType='" + mimeType + '\'' +
|
||||
", fileSize=" + fileSize +
|
||||
", title='" + title + '\'' +
|
||||
", performer='" + performer + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -126,4 +126,16 @@ public class Chat implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Chat{" +
|
||||
"id=" + id +
|
||||
", type='" + type + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", firstName='" + firstName + '\'' +
|
||||
", lastName='" + lastName + '\'' +
|
||||
", userName='" + userName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -63,4 +63,13 @@ public class ChosenInlineQuery implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ChosenInlineQuery{" +
|
||||
"resultId='" + resultId + '\'' +
|
||||
", from=" + from +
|
||||
", query='" + query + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -65,4 +65,14 @@ public class Contact implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Contact{" +
|
||||
"phoneNumber='" + phoneNumber + '\'' +
|
||||
", firstName='" + firstName + '\'' +
|
||||
", lastName='" + lastName + '\'' +
|
||||
", userID=" + userID +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -116,4 +116,15 @@ public class Document implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Document{" +
|
||||
"fileId='" + fileId + '\'' +
|
||||
", thumb=" + thumb +
|
||||
", fileName='" + fileName + '\'' +
|
||||
", mimeType='" + mimeType + '\'' +
|
||||
", fileSize=" + fileSize +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -83,4 +83,13 @@ public class File implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "File{" +
|
||||
"fileId='" + fileId + '\'' +
|
||||
", fileSize=" + fileSize +
|
||||
", filePath='" + filePath + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -91,4 +91,12 @@ public class ForceReplyKeyboard implements ReplyKeyboard {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ForceReplyKeyboard{" +
|
||||
"forceReply=" + forceReply +
|
||||
", selective=" + selective +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -73,4 +73,15 @@ public class InlineQuery implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InlineQuery{" +
|
||||
"id='" + id + '\'' +
|
||||
", from=" + from +
|
||||
", query='" + query + '\'' +
|
||||
", offset='" + offset + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -238,4 +238,22 @@ public class InlineQueryResultArticle implements InlineQueryResult {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InlineQueryResultArticle{" +
|
||||
"type='" + type + '\'' +
|
||||
", id='" + id + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", messageText='" + messageText + '\'' +
|
||||
", parseMode='" + parseMode + '\'' +
|
||||
", disableWebPagePreview=" + disableWebPagePreview +
|
||||
", url='" + url + '\'' +
|
||||
", hideUrl=" + hideUrl +
|
||||
", description='" + description + '\'' +
|
||||
", thumbUrl='" + thumbUrl + '\'' +
|
||||
", thumbWidth=" + thumbWidth +
|
||||
", thumbHeight=" + thumbHeight +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -222,4 +222,21 @@ public class InlineQueryResultGif implements InlineQueryResult {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InlineQueryResultGif{" +
|
||||
"type='" + type + '\'' +
|
||||
", id='" + id + '\'' +
|
||||
", gifUrl='" + gifUrl + '\'' +
|
||||
", gifWidth=" + gifWidth +
|
||||
", gifHeight=" + gifHeight +
|
||||
", thumbUrl='" + thumbUrl + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", caption='" + caption + '\'' +
|
||||
", messageText='" + messageText + '\'' +
|
||||
", parseMode='" + parseMode + '\'' +
|
||||
", disableWebPagePreview=" + disableWebPagePreview +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -223,4 +223,21 @@ public class InlineQueryResultMpeg4Gif implements InlineQueryResult {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InlineQueryResultMpeg4Gif{" +
|
||||
"type='" + type + '\'' +
|
||||
", id='" + id + '\'' +
|
||||
", mpeg4Url='" + mpeg4Url + '\'' +
|
||||
", mpeg4Width=" + mpeg4Width +
|
||||
", mpeg4Height=" + mpeg4Height +
|
||||
", thumbUrl='" + thumbUrl + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", caption='" + caption + '\'' +
|
||||
", messageText='" + messageText + '\'' +
|
||||
", parseMode='" + parseMode + '\'' +
|
||||
", disableWebPagePreview=" + disableWebPagePreview +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -258,4 +258,23 @@ public class InlineQueryResultPhoto implements InlineQueryResult {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InlineQueryResultPhoto{" +
|
||||
"type='" + type + '\'' +
|
||||
", id='" + id + '\'' +
|
||||
", photoUrl='" + photoUrl + '\'' +
|
||||
", mimeType='" + mimeType + '\'' +
|
||||
", photoWidth=" + photoWidth +
|
||||
", photoHeight=" + photoHeight +
|
||||
", thumbUrl='" + thumbUrl + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", caption='" + caption + '\'' +
|
||||
", messageText='" + messageText + '\'' +
|
||||
", parseMode='" + parseMode + '\'' +
|
||||
", disableWebPagePreview=" + disableWebPagePreview +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -254,4 +254,23 @@ public class InlineQueryResultVideo implements InlineQueryResult {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InlineQueryResultVideo{" +
|
||||
"type='" + type + '\'' +
|
||||
", id='" + id + '\'' +
|
||||
", mimeType='" + mimeType + '\'' +
|
||||
", videoUrl='" + videoUrl + '\'' +
|
||||
", videoWidth=" + videoWidth +
|
||||
", videoHeight=" + videoHeight +
|
||||
", videoDuration=" + videoDuration +
|
||||
", thumbUrl='" + thumbUrl + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", messageText='" + messageText + '\'' +
|
||||
", parseMode='" + parseMode + '\'' +
|
||||
", disableWebPagePreview=" + disableWebPagePreview +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -63,4 +63,12 @@ public class Location implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Location{" +
|
||||
"longitude=" + longitude +
|
||||
", latitude=" + latitude +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -525,4 +525,36 @@ public class Message implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Message{" +
|
||||
"messageId=" + messageId +
|
||||
", from=" + from +
|
||||
", date=" + date +
|
||||
", chat=" + chat +
|
||||
", forwardFrom=" + forwardFrom +
|
||||
", forwardDate=" + forwardDate +
|
||||
", text='" + text + '\'' +
|
||||
", audio=" + audio +
|
||||
", document=" + document +
|
||||
", photo=" + photo +
|
||||
", sticker=" + sticker +
|
||||
", video=" + video +
|
||||
", contact=" + contact +
|
||||
", location=" + location +
|
||||
", newChatParticipant=" + newChatParticipant +
|
||||
", leftChatParticipant=" + leftChatParticipant +
|
||||
", newChatTitle='" + newChatTitle + '\'' +
|
||||
", newChatPhoto=" + newChatPhoto +
|
||||
", deleteChatPhoto=" + deleteChatPhoto +
|
||||
", groupchatCreated=" + groupchatCreated +
|
||||
", replyToMessage=" + replyToMessage +
|
||||
", voice=" + voice +
|
||||
", superGroupCreated=" + superGroupCreated +
|
||||
", channelChatCreated=" + channelChatCreated +
|
||||
", migrateToChatId=" + migrateToChatId +
|
||||
", migrateFromChatId=" + migrateFromChatId +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -93,4 +93,14 @@ public class PhotoSize implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PhotoSize{" +
|
||||
"fileId='" + fileId + '\'' +
|
||||
", width=" + width +
|
||||
", height=" + height +
|
||||
", fileSize=" + fileSize +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -85,4 +85,12 @@ public class ReplyKeyboardHide implements ReplyKeyboard {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ReplyKeyboardHide{" +
|
||||
"hideKeyboard=" + hideKeyboard +
|
||||
", selective=" + selective +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -153,4 +153,14 @@ public class ReplyKeyboardMarkup implements ReplyKeyboard {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ReplyKeyboardMarkup{" +
|
||||
"keyboard=" + keyboard +
|
||||
", resizeKeyboard=" + resizeKeyboard +
|
||||
", oneTimeKeyboad=" + oneTimeKeyboad +
|
||||
", selective=" + selective +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -70,4 +70,15 @@ public class Sticker implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Sticker{" +
|
||||
"fileId='" + fileId + '\'' +
|
||||
", width=" + width +
|
||||
", height=" + height +
|
||||
", thumb=" + thumb +
|
||||
", fileSize=" + fileSize +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -101,4 +101,14 @@ public class Update implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Update{" +
|
||||
"updateId=" + updateId +
|
||||
", message=" + message +
|
||||
", inlineQuery=" + inlineQuery +
|
||||
", chosenInlineQuery=" + chosenInlineQuery +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -81,4 +81,14 @@ public class User implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "User{" +
|
||||
"id=" + id +
|
||||
", firstName='" + firstName + '\'' +
|
||||
", lastName='" + lastName + '\'' +
|
||||
", userName='" + userName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -87,4 +87,12 @@ public class UserProfilePhotos implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserProfilePhotos{" +
|
||||
"totalCount=" + totalCount +
|
||||
", photos=" + photos +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -139,4 +139,17 @@ public class Video implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Video{" +
|
||||
"fileId='" + fileId + '\'' +
|
||||
", width=" + width +
|
||||
", height=" + height +
|
||||
", duration=" + duration +
|
||||
", thumb=" + thumb +
|
||||
", mimeType='" + mimeType + '\'' +
|
||||
", fileSize=" + fileSize +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -96,4 +96,14 @@ public class Voice implements IBotApiObject {
|
||||
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
|
||||
serialize(gen, serializers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Voice{" +
|
||||
"fileId='" + fileId + '\'' +
|
||||
", duration=" + duration +
|
||||
", mimeType='" + mimeType + '\'' +
|
||||
", fileSize=" + fileSize +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package org.telegram.telegrambots.bots;
|
||||
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
@ -185,7 +186,6 @@ public abstract class AbsSender {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
String url = getBaseUrl() + SendDocument.PATH;
|
||||
HttpPost httppost = new HttpPost(url);
|
||||
|
||||
if (sendDocument.isNewDocument()) {
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
||||
builder.addTextBody(SendDocument.CHATID_FIELD, sendDocument.getChatId());
|
||||
@ -233,7 +233,6 @@ public abstract class AbsSender {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
String url = getBaseUrl() + SendPhoto.PATH;
|
||||
HttpPost httppost = new HttpPost(url);
|
||||
|
||||
if (sendPhoto.isNewPhoto()) {
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
||||
builder.addTextBody(SendPhoto.CHATID_FIELD, sendPhoto.getChatId());
|
||||
@ -287,7 +286,6 @@ public abstract class AbsSender {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
String url = getBaseUrl() + SendVideo.PATH;
|
||||
HttpPost httppost = new HttpPost(url);
|
||||
|
||||
if (sendVideo.isNewVideo()) {
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
||||
builder.addTextBody(SendVideo.CHATID_FIELD, sendVideo.getChatId());
|
||||
@ -348,7 +346,6 @@ public abstract class AbsSender {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
String url = getBaseUrl() + SendSticker.PATH;
|
||||
HttpPost httppost = new HttpPost(url);
|
||||
|
||||
if (sendSticker.isNewSticker()) {
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
||||
builder.addTextBody(SendSticker.CHATID_FIELD, sendSticker.getChatId());
|
||||
|
Loading…
Reference in New Issue
Block a user