Crates.io | vk_executive |
lib.rs | vk_executive |
version | 0.8.5 |
source | src |
created_at | 2023-02-03 20:42:57.948049 |
updated_at | 2023-02-28 15:44:26.902542 |
description | Relatively low-level VK API library designed for millions requests per second |
homepage | |
repository | https://github.com/kinetus/vk_executive |
max_upload_size | |
id | 775920 |
size | 36,884 |
Library for fast data collection from VK
[dependencies]
vk_executive = "0.8"
use vk_executive::{Client, Instance};
use vk_method::{Method, Params};
#[tokio::main]
async fn main() {
let token = ["1234567890abcdef1234567890abcdef1234567890abcdef"];
let instances = Instance::from_tokens(token).unwrap();
let pool = Client::from_instances(instances);
let mut params = Params::new();
params.insert("user_id", 1);
let response = pool.method(Method::new(
"users.get",
params,
)).await.unwrap();
assert_eq!(
response,
serde_json::json!([
{
"id": 1,
"first_name": "Pavel",
"last_name": "Durov",
"is_closed": false,
"can_access_closed": true
}
])
)
}