An open API service indexing awesome lists of open source software.

https://github.com/alexandrebouthinon/kuzzle-rs

Kuzzle Rust SDK
https://github.com/alexandrebouthinon/kuzzle-rs

hacktoberfest kuzzle kuzzle-sdk

Last synced: 3 months ago
JSON representation

Kuzzle Rust SDK

Awesome Lists containing this project

README

        






GitHub Workflow Status







## Usage

The SDK supports different protocols. When instantiating,
you must choose the protocol to use and fill in the different options needed to connect to Kuzzle.

```rust
use kuzzle::protocols::WebSocket;
use kuzzle::{request, Kuzzle};

#[async_std::main]
async fn main() -> Result<(), Box> {
let mut k = Kuzzle::new(WebSocket::new("localhost", None));
k.connect().await?;

let request = request!({
"controller": "server",
"action": "now"
})?;

let response = k.query(&request).await?;

match response.get_result() {
Some(result) => println!("Kuzzle current Epoc timestamp: {}", &result["now"]),
None => eprintln!("No timestamp was reveived from the Kuzzle server!"),
}

k.disconnect().await
}
```

## About

### Kuzzle

Kuzzle is an open-source backend that includes a scalable server, a multiprotocol API,
an administration console and a set of plugins that provide advanced functionalities like real-time pub/sub, blazing fast search and geofencing.

* :octocat: __[Github](https://github.com/kuzzleio/kuzzle)__
* :earth_africa: __[Website](https://kuzzle.io)__
* :books: __[Documentation](https://docs.kuzzle.io)__
* :email: __[Discord](http://join.discord.kuzzle.io)__