pikav-client

Crates.iopikav-client
lib.rspikav-client
version0.20.14
sourcesrc
created_at2022-06-16 21:21:47.599666
updated_at2024-02-27 04:01:52.262738
descriptionA client that help you publish to pikav server
homepagehttps://pikav.timada.co
repositoryhttps://github.com/timayz/pikav
max_upload_size
id607668
size16,497
(snapiz)

documentation

https://docs.rs/pikav-client

README

A client that help you publish to pikav server


Getting Started

use serde_json::json;
use pikav_client::{Client, ClientOptions, Event};

#[tokio::main]
async fn main() -> std::io::Result<()> {
    let pikva_client = Client::new(ClientOptions {
        url: "http://127.0.0.1:6750".to_owned(),
        namespace: None,
    });

    client.publish(vec![Event::new(
            user.0,
            "todos/1",
            "Deleted",
            json!({
                "id": id.to_owned()
            }),
        )
        .unwrap()]);
}
Commit count: 149

cargo fmt