Class Send
java.lang.Object
api.longpoll.bots.methods.impl.VkMethod<Send.ResponseBody>
api.longpoll.bots.methods.impl.messages.Send
Implements messages.send method.
Sends a message.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDoc
(String filename, InputStream doc) Adds URL parameter to HTTP request.addPhoto
(String filename, InputStream photo) execute()
Executes request to VK API.Executes request to VK API asynchronously.protected Class<Send.ResponseBody>
Gets a class of VK API response.setAttachment
(UploadedFile... uploadedFiles) setAttachment
(Iterable<UploadedFile> uploadedFiles) setAttachment
(String attachment) setChatId
(int chatId) setDisableMentions
(boolean disableMentions) setDontParseLinks
(boolean dontParseLinks) setForward
(Forward forward) setForwardMessages
(Integer... forwardMessages) setForwardMessages
(Iterable<Integer> forwardMessages) setKeyboard
(Keyboard keyboard) setLatitude
(float latitude) setLongitude
(float longitude) setMessage
(String message) setPayload
(com.google.gson.JsonElement payload) setPeerId
(int peerId) setPeerIds
(Integer... peerIds) setPeerIds
(Iterable<Integer> peerIds) setRandomId
(int randomId) setReplyTo
(int replyTo) setStickerId
(int stickerId) setTemplate
(Template template) setUserId
(int userId) setUserIds
(Integer... userIds) setUserIds
(Iterable<Integer> userIds) Methods inherited from class api.longpoll.bots.methods.impl.VkMethod
newRequestBody, setLang
-
Constructor Details
-
Send
-
-
Method Details
-
getResponseClass
Description copied from class:VkMethod
Gets a class of VK API response. This value is used during deserialization of received JSON.- Specified by:
getResponseClass
in classVkMethod<Send.ResponseBody>
- Returns:
- a class of VK API response.
-
execute
Description copied from class:VkMethod
Executes request to VK API.- Overrides:
execute
in classVkMethod<Send.ResponseBody>
- Returns:
- VK API response.
- Throws:
VkApiException
- if errors occur.
-
executeAsync
Description copied from class:VkMethod
Executes request to VK API asynchronously.- Overrides:
executeAsync
in classVkMethod<Send.ResponseBody>
- Returns:
- VK API response wrapped to CompletableFuture
-
addPhoto
-
addPhoto
-
addPhoto
-
addPhoto
-
addDoc
-
addDoc
-
addDoc
-
addDoc
-
setAttachment
-
setAttachment
-
setAttachment
-
setUserId
-
setRandomId
-
setPeerId
-
setPeerIds
-
setPeerIds
-
setDomain
-
setChatId
-
setUserIds
-
setUserIds
-
setMessage
-
setLatitude
-
setLongitude
-
setReplyTo
-
setForwardMessages
-
setForwardMessages
-
setStickerId
-
setDontParseLinks
-
setDisableMentions
-
setKeyboard
-
setTemplate
-
setForward
-
setPayload
-
addParam
Description copied from class:VkMethod
Adds URL parameter to HTTP request.- Overrides:
addParam
in classVkMethod<Send.ResponseBody>
- Parameters:
key
- URL parameter key.value
- URL parameter value.- Returns:
- current instance.
-