vk_executive

Crates.iovk_executive
lib.rsvk_executive
version0.8.5
sourcesrc
created_at2023-02-03 20:42:57.948049
updated_at2023-02-28 15:44:26.902542
descriptionRelatively low-level VK API library designed for millions requests per second
homepage
repositoryhttps://github.com/kinetus/vk_executive
max_upload_size
id775920
size36,884
Eduard Baturin (Trard)

documentation

https://docs.rs/vk_executive

README

VK Executive 🚀

Library for fast data collection from VK

[dependencies]
vk_executive = "0.8"

Example

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
            }
        ])
    )
}
Commit count: 204

cargo fmt