Expand description

This is the Rust crate for using Noelware’s Analytics API which includes a client implementation under the protos/ module.

This was meant to be in use with the analytics-server, but you can use the client to request to your instances.

Example

use nwl_protobufs_rust::protos::*;

fn main() -> Result<(), Box<dyn std::error::Error>> {
   // [::1]:50051 is the server that uses Noelware Analytics.
   // The server must implement a gRPC endpoint.
   //
   // Supported products: charted-server, Arisu
   // Using official instances will not work.
   let mut client = AnalyticsClient::connect("http://[::1]:50051").await?;

   let request = tonic::Request::new(ConnectionAckRequest {});
   let res = client.connection_ack(request).await?;

   Ok(())
}

Re-exports

pub use prost_types;

Modules

Generated client implementations.

Macros

Structs

Constants

Returns the commit SHA of the commit hash that was used to build the protocol buffers.