pub struct VkApi { /* private fields */ }Implementations§
Source§impl VkApi
impl VkApi
pub fn new<T: Into<String>>(token: T) -> VkResult<Self>
pub fn builder() -> VkApiBuilder
pub fn token(&self) -> &str
pub fn version(&self) -> &str
pub async fn call_method( &self, method: &str, params: HashMap<String, String>, ) -> VkResult<Value>
pub async fn messages_send( &self, peer_id: i64, message: &str, keyboard: Option<&Keyboard>, attachment: Option<&str>, sticker_id: Option<i64>, reply_to: Option<i64>, forward_messages: Option<&[i64]>, disable_mentions: bool, dont_parse_links: bool, random_id: Option<i64>, ) -> VkResult<i64>
pub async fn messages_edit( &self, peer_id: i64, message_id: i64, message: &str, keyboard: Option<&Keyboard>, attachment: Option<&str>, keep_forward_messages: bool, keep_snippets: bool, ) -> VkResult<bool>
pub async fn messages_delete( &self, message_ids: &[i64], delete_for_all: bool, spam: bool, ) -> VkResult<Map<String, Value>>
pub async fn messages_restore(&self, message_id: i64) -> VkResult<bool>
pub async fn messages_mark_as_read( &self, peer_id: i64, start_message_id: Option<i64>, ) -> VkResult<bool>
pub async fn messages_mark_as_important( &self, message_ids: &[i64], important: Option<i32>, ) -> VkResult<Vec<i64>>
pub async fn messages_get_conversations( &self, offset: i32, count: i32, filter: Option<&str>, ) -> VkResult<Value>
pub async fn messages_get_conversation_members( &self, peer_id: i64, fields: Option<&str>, ) -> VkResult<Value>
pub async fn messages_get_history( &self, peer_id: i64, offset: i32, count: i32, start_message_id: Option<i64>, rev: bool, ) -> VkResult<Value>
pub async fn messages_get_by_id( &self, message_ids: &[i64], preview_length: i32, extended: bool, ) -> VkResult<Value>
pub async fn messages_search( &self, query: &str, peer_id: Option<i64>, date: Option<i64>, count: i32, ) -> VkResult<Value>
pub async fn messages_search_conversations( &self, query: &str, count: i32, extended: bool, fields: Option<&str>, ) -> VkResult<Value>
pub async fn messages_get_attachments( &self, peer_id: i64, media_type: &str, start_from: Option<&str>, count: i32, ) -> VkResult<Value>
pub async fn messages_get_invite_link( &self, peer_id: i64, reset: bool, ) -> VkResult<String>
pub async fn messages_remove_chat_user( &self, chat_id: i64, user_id: i64, member_id: Option<i64>, ) -> VkResult<bool>
pub async fn messages_add_chat_user( &self, chat_id: i64, user_id: i64, ) -> VkResult<bool>
pub async fn messages_create_chat( &self, user_ids: &[i64], title: Option<&str>, ) -> VkResult<i64>
pub async fn messages_set_activity( &self, peer_id: i64, user_id: Option<i64>, activity_type: &str, ) -> VkResult<bool>
pub async fn messages_send_message_event_answer( &self, event_id: &str, user_id: i64, peer_id: i64, event_data: Option<&str>, ) -> VkResult<bool>
pub async fn users_get( &self, user_ids: &[i64], fields: Option<&str>, name_case: Option<&str>, ) -> VkResult<Value>
pub async fn groups_get_long_poll_server( &self, group_id: i64, ) -> VkResult<LongPollServer>
pub async fn groups_get_by_id( &self, group_ids: &[i64], fields: Option<&str>, ) -> VkResult<Value>
pub async fn send_message(&self, peer_id: i64, message: &str) -> VkResult<i64>
pub async fn send_message_with_keyboard( &self, peer_id: i64, message: &str, keyboard: &Keyboard, ) -> VkResult<i64>
pub async fn send_reply( &self, peer_id: i64, message: &str, reply_to: i64, ) -> VkResult<i64>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VkApi
impl !RefUnwindSafe for VkApi
impl Send for VkApi
impl Sync for VkApi
impl Unpin for VkApi
impl !UnwindSafe for VkApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more