summaryrefslogtreecommitdiffstats
path: root/src/client/commands.rs
diff options
context:
space:
mode:
authorsyn <isaqtm@gmail.com>2021-01-08 23:51:31 +0300
committersyn <isaqtm@gmail.com>2021-01-08 23:51:31 +0300
commite147d7a7a1f581d0ada19077cc22f23fda8a8cb4 (patch)
treeb712e81054c4c00d0484246bb8043e7243aa0f50 /src/client/commands.rs
parent84e9ac248dadcbbe9cf21a2fe3020005f96b4ec0 (diff)
downloadtdlib-rs-e147d7a7a1f581d0ada19077cc22f23fda8a8cb4.tar.gz
[wip] some support for telegram methods & types
Diffstat (limited to 'src/client/commands.rs')
-rw-r--r--src/client/commands.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/commands.rs b/src/client/commands.rs
new file mode 100644
index 0000000..3d9427d
--- /dev/null
+++ b/src/client/commands.rs
@@ -0,0 +1,11 @@
+use super::types::*;
+use super::ClientLike;
+use crate::error::Result;
+use serde_json::json;
+use std::future::Future;
+
+impl super::Client {
+ pub fn get_me(&self) -> impl Future<Output = Result<User>> {
+ self.send(json!({"@type": "getMe"}))
+ }
+}