Crates.io | pikav-client |
lib.rs | pikav-client |
version | 0.20.14 |
source | src |
created_at | 2022-06-16 21:21:47.599666 |
updated_at | 2024-02-27 04:01:52.262738 |
description | A client that help you publish to pikav server |
homepage | https://pikav.timada.co |
repository | https://github.com/timayz/pikav |
max_upload_size | |
id | 607668 |
size | 16,497 |
A client that help you publish to pikav server
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()]);
}